Simplify generate_icode by using item var for processing imm call reference.
@@ -401,11 +401,11 @@ static void generate_icode (MIR_context_t ctx, MIR_item_t func_item) {
mir_assert (ops[i].mode == MIR_OP_REF && ops[i].u.ref->item_type == MIR_proto_item);
v.a = ops[i].u.ref;
} else if (i == 1 && imm_call_p) {
- mir_assert (ops[i].u.ref->item_type == MIR_import_item
- || ops[i].u.ref->item_type == MIR_export_item
- || ops[i].u.ref->item_type == MIR_forward_item
- || ops[i].u.ref->item_type == MIR_func_item);
- v.a = ops[i].u.ref->addr;
+ MIR_item_t item = ops[i].u.ref;
+
+ mir_assert (item->item_type == MIR_import_item || item->item_type == MIR_export_item
+ || item->item_type == MIR_forward_item || item->item_type == MIR_func_item);
+ v.a = item->addr;
} else if (code == MIR_VA_ARG && i == 2) { /* type */
mir_assert (ops[i].mode == MIR_OP_MEM);
v.i = ops[i].u.mem.type;
