} 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);
}
return _get_Block_cfgpred_block(node, pos);
}
-bool
+int
get_Block_matured (ir_node *node) {
assert (node->op == op_Block);
- return node->attr.block.matured;
+ return (int)node->attr.block.matured;
}
void
-set_Block_matured (ir_node *node, bool matured) {
+set_Block_matured (ir_node *node, int matured) {
assert (node->op == op_Block);
node->attr.block.matured = matured;
}
/* Fix backedge array. fix_backedges() operates depending on
interprocedural_view. */
int ipv = get_interprocedural_view();
- set_interprocedural_view(true);
+ set_interprocedural_view(1);
fix_backedges(current_ir_graph->obst, node);
set_interprocedural_view(ipv);
}
assert(fromtype);
- if (!is_Class_type(totype)) return false;
+ if (!is_Class_type(totype)) return 0;
return is_subclass_of(fromtype, totype);
}
assert(fromtype);
- if (!is_Class_type(totype)) return false;
+ if (!is_Class_type(totype)) return 0;
return is_subclass_of(totype, fromtype);
}