tr: Add and use new_type_segment().
[libfirm] / ir / tr / typewalk.c
index 360efd1..2f07ca9 100644 (file)
@@ -93,7 +93,6 @@ static void do_type_walk(type_or_ent tore,
        size_t      i, n_types, n_mem;
        ir_entity   *ent = NULL;
        ir_type     *tp = NULL;
-       ir_node     *n;
        type_or_ent cont;
 
        /* marked? */
@@ -129,12 +128,6 @@ static void do_type_walk(type_or_ent tore,
                /* walk over the value types */
                if (ent->initializer != NULL) {
                        walk_initializer(ent->initializer, pre, post, env);
-               } else if (entity_has_compound_ent_values(ent)) {
-                       size_t i, n_mem = get_compound_ent_n_values(ent);
-                       for (i = 0; i < n_mem; ++i) {
-                               n = get_compound_ent_value(ent, i);
-                               irn_type_walker(n, pre, post, env);
-                       }
                }
                break;
        case k_type:
@@ -501,7 +494,6 @@ static void class_walk_s2s_2(ir_type *tp, class_walk_func *pre,
        /* marked? */
        if (type_visited(tp)) return;
 
-       assert(is_Class_type(tp));
        /* Assure all supertypes are visited before */
        n = get_class_n_supertypes(tp);
        for (i = 0; i < n; ++i) {
@@ -538,8 +530,8 @@ void class_walk_super2sub(class_walk_func *pre,
                if (is_Class_type(tp) &&
                    (get_class_n_supertypes(tp) == 0) &&
                    type_not_visited(tp) &&
+                   (! is_frame_type(tp)) &&
                    (tp != get_glob_type())) {
-                       assert(! is_frame_type(tp));
                        class_walk_s2s_2(tp, pre, post, env);
                }
        }