changed __functions into more comfrom _functions
[libfirm] / ir / tr / typewalk.c
index 043b3b0..961e668 100644 (file)
 
 
 #ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
 
 #include "typewalk.h"
@@ -191,13 +194,10 @@ static void start_type_walk(ir_node *node, void *env) {
   }
 }
 
-void type_walk(type_walk_func *pre,
-              type_walk_func *post,
-              void *env) {
+void type_walk(type_walk_func *pre, type_walk_func *post, void *env) {
   int i, n_types = get_irp_n_types();
+
   ++type_visited;
-  /*type_walk_2((type_or_ent *)get_glob_type(), pre, post, env);
-   global type is on the list visited below, too. */
   for (i = 0; i < n_types; i++) {
     type_walk_2((type_or_ent *)get_irp_type(i), pre, post, env);
   }
@@ -434,7 +434,7 @@ class_walk_s2s_2(type *tp,
   /* marked? */
   if (tp->visit >= type_visited) return;
 
-  assert(is_class_type(tp));
+  assert(is_Class_type(tp));
   /* Assure all supertypes are visited before */
   for (i=0; i < get_class_n_supertypes(tp); i++) {
     if (get_type_visited(get_class_supertype(tp, i)) < type_visited)
@@ -469,9 +469,9 @@ void class_walk_super2sub(
   ++type_visited;
   for (i = 0; i < n_types; i++) {
     tp = get_irp_type(i);
-    if (is_class_type(tp) &&
-       (get_class_n_supertypes(tp) == 0) &&
-       (tp->visit < type_visited))  {
+    if (is_Class_type(tp) &&
+           (get_class_n_supertypes(tp) == 0) &&
+           (tp->visit < type_visited))  {
       assert(!is_frame_type(tp));
       assert(tp != get_glob_type());
       class_walk_s2s_2(tp, pre, post, env);