From: Eduard Frank Date: Tue, 15 Mar 2011 14:46:33 +0000 (+0100) Subject: methods need no offset X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=a570fca6677ea8d74f2f5aa5462636696bb92559;p=libfirm methods need no offset --- diff --git a/ir/tr/type.c b/ir/tr/type.c index 87050c510..d5227482e 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -364,11 +364,10 @@ void set_type_state(ir_type *tp, ir_type_state state) if (tp != get_glob_type()) { size_t n_mem = get_class_n_members(tp); for (i = 0; i < n_mem; i++) { - assert(get_entity_offset(get_class_member(tp, i)) > -1); - /* TR ?? - assert(is_Method_type(get_entity_type(get_class_member(tp, i))) || - (get_entity_allocation(get_class_member(tp, i)) == allocation_automatic)); - */ + ir_entity *entity = get_class_member(tp, i); + if (is_Method_type(get_entity_type(entity))) + continue; + assert(get_entity_offset(entity) > -1); } } break; @@ -378,12 +377,8 @@ void set_type_state(ir_type *tp, ir_type_state state) } break; case tpo_union: - /* ?? */ break; case tpo_array: - /* ?? - Check order? - Assure that only innermost dimension is dynamic? */ break; case tpo_enumeration: { #ifndef NDEBUG @@ -398,7 +393,7 @@ void set_type_state(ir_type *tp, ir_type_state state) break; } default: break; - } /* switch (tp) */ + } } if (state == layout_fixed) tp->flags |= tf_layout_fixed;