diff --git a/types.c b/types.c index 47c0103..e1f3026 100644 --- a/types.c +++ b/types.c @@ -187,29 +187,6 @@ precision_cmp_e compare_precision(type_t *a, type_t *b) else return NUM_PRECISION_INCOMPARABLE; } -bool is_orderable(type_t *t) -{ - switch (t->tag) { - case ArrayType: return is_orderable(Match(t, ArrayType)->item_type); - case PointerType: case FunctionType: case TableType: return false; - case StructType: { - for (arg_t *field = Match(t, StructType)->fields; field; field = field->next) { - if (!is_orderable(field->type)) - return false; - } - return true; - } - case EnumType: { - for (tag_t *tag = Match(t, EnumType)->tags; tag; tag = tag->next) { - if (tag->type && !is_orderable(tag->type)) - return false; - } - return true; - } - default: return true; - } -} - bool has_heap_memory(type_t *t) { switch (t->tag) { diff --git a/types.h b/types.h index 696835a..40cb448 100644 --- a/types.h +++ b/types.h @@ -113,7 +113,6 @@ type_t *type_or_type(type_t *a, type_t *b); type_t *value_type(type_t *a); typedef enum {NUM_PRECISION_EQUAL, NUM_PRECISION_LESS, NUM_PRECISION_MORE, NUM_PRECISION_INCOMPARABLE} precision_cmp_e; precision_cmp_e compare_precision(type_t *a, type_t *b); -bool is_orderable(type_t *t); bool has_heap_memory(type_t *t); bool has_stack_memory(type_t *t); bool can_promote(type_t *actual, type_t *needed);