From 3fea1f421457fe16f48f9487ceaefbfcecb32f2b Mon Sep 17 00:00:00 2001 From: Boris Boesler Date: Mon, 25 Oct 2004 13:53:06 +0000 Subject: [PATCH] handling some "unknown_type"-stuff [r4203] --- ir/ir/ircons.c | 2 +- ir/ir/irdump.c | 20 +++++++++++--------- ir/ir/irnode.c | 2 +- ir/ir/irvrfy.c | 7 ++++++- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index c0854b430..531baa01f 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -540,7 +540,7 @@ new_rd_Call (dbg_info* db, ir_graph *irg, ir_node *block, ir_node *store, res = new_ir_node(db, irg, block, op_Call, mode_T, r_arity, r_in); - assert(is_method_type(tp)); + assert((get_unknown_type() == tp) || is_method_type(tp)); set_Call_type(res, tp); res->attr.call.exc.pin_state = op_pin_state_pinned; res->attr.call.callee_arr = NULL; diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 46fc90c56..9393af1d0 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -742,18 +742,20 @@ static INLINE int dump_node_info(FILE *F, ir_node *n) case iro_Call: { type *tp = get_Call_type(n); fprintf(F, "calling method of type %s \n", get_type_name_ex(tp, &bad)); - for (i = 0; i < get_method_n_params(tp); ++i) - fprintf(F, " param %d type: %s \n", i, get_type_name_ex(get_method_param_type(tp, i), &bad)); - for (i = 0; i < get_method_n_ress(tp); ++i) - fprintf(F, " resul %d type: %s \n", i, get_type_name_ex(get_method_res_type(tp, i), &bad)); + if(get_unknown_type() != tp) { + for (i = 0; i < get_method_n_params(tp); ++i) + fprintf(F, " param %d type: %s \n", i, get_type_name_ex(get_method_param_type(tp, i), &bad)); + for (i = 0; i < get_method_n_ress(tp); ++i) + fprintf(F, " resul %d type: %s \n", i, get_type_name_ex(get_method_res_type(tp, i), &bad)); + } if (Call_has_callees(n)) { fprintf(F, "possible callees: \n"); for (i = 0; i < get_Call_n_callees(n); i++) { - if (!get_Call_callee(n, i)) { - fprintf(F, " %d external method\n", i); - } else { - fprintf(F, " %d: %s\n", i, get_ent_dump_name(get_Call_callee(n, i))); - } + if (!get_Call_callee(n, i)) { + fprintf(F, " %d external method\n", i); + } else { + fprintf(F, " %d: %s\n", i, get_ent_dump_name(get_Call_callee(n, i))); + } } } } break; diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index ce3965653..e7afc88d7 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -1122,7 +1122,7 @@ get_Call_type (ir_node *node) { void set_Call_type (ir_node *node, type *tp) { assert (node->op == op_Call); - assert (is_method_type(tp)); + assert ((get_unknown_type() == tp) || is_method_type(tp)); node->attr.call.cld_tp = tp; } diff --git a/ir/ir/irvrfy.c b/ir/ir/irvrfy.c index 722a7f357..608c4f2bd 100644 --- a/ir/ir/irvrfy.c +++ b/ir/ir/irvrfy.c @@ -745,12 +745,17 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg) /* Call: BB x M x ref x data1 x ... x datan --> M x datan+1 x ... x data n+m */ ASSERT_AND_RET( op1mode == mode_M && mode_is_reference(op2mode), "Call node", 0 ); /* operand M x ref */ + + mt = get_Call_type(n); + if(get_unknown_type() == mt) { + break; + } + for (i=3; i < get_irn_arity(n); i++) { ASSERT_AND_RET( mode_is_data(get_irn_mode(in[i])), "Call node", 0 ); /* operand datai */ }; ASSERT_AND_RET( mymode == mode_T, "Call result not a tuple", 0 ); /* result T */ /* Compare arguments of node with those of type */ - mt = get_Call_type(n); if (get_method_variadicity(mt) == variadicity_variadic) { ASSERT_AND_RET_DBG( -- 2.20.1