renamed all type * to ir_type *
[libfirm] / ir / ir / irnode.c
index 9c2b872..5a8a7b2 100644 (file)
@@ -238,17 +238,24 @@ set_irn_in (ir_node *node, int arity, ir_node **in) {
   } else {
     arr = &node->in;
   }
-  if (arity != ARR_LEN(*arr) - 1) {
+
+       for (i = 0; i < arity; i++) {
+               if (i < ARR_LEN(*arr)-1)
+       edges_notify_edge(node, i, in[i], (*arr)[i+1], current_ir_graph);
+               else
+           edges_notify_edge(node, i, in[i], NULL,        current_ir_graph);
+  }
+       for(;i < ARR_LEN(*arr)-1; i++) {
+               edges_notify_edge(node, i, NULL, (*arr)[i+1], current_ir_graph);
+       }
+
+       if (arity != ARR_LEN(*arr) - 1) {
     ir_node * block = (*arr)[0];
     *arr = NEW_ARR_D(ir_node *, current_ir_graph->obst, arity + 1);
     (*arr)[0] = block;
   }
   fix_backedges(current_ir_graph->obst, node);
 
-  for (i = 0; i < arity; i++) {
-    edges_notify_edge(node, i, in[i], (*arr)[i+1], current_ir_graph);
-  }
-
   memcpy((*arr) + 1, in, sizeof(ir_node *) * arity);
 }
 
@@ -1416,7 +1423,7 @@ int is_Cast_upcast(ir_node *node) {
   assert(fromtype);
 
   if (!is_Class_type(totype)) return 0;
-  return is_subclass_of(fromtype, totype);
+  return is_SubClass_of(fromtype, totype);
 }
 
 /* Checks for downcast.
@@ -1438,7 +1445,7 @@ int is_Cast_downcast(ir_node *node) {
   assert(fromtype);
 
   if (!is_Class_type(totype)) return 0;
-  return is_subclass_of(totype, fromtype);
+  return is_SubClass_of(totype, fromtype);
 }
 
 int