/* Call the Virtual Jumper */ PDEBUG("IRJIT: Create the call to the virtual call handler\n"); v_method = jit_insn_call_native(method->getJITFunction(method), "virtual_jumper", virtual_jumper, sign, args, 4, JIT_CALL_NOTHROW); assert(v_method != NULL); /* Call the virtual method */ v_args_number = g_list_length((inst->IO).params); v_args = (jit_value_t *) malloc (sizeof(jit_value_t) * v_args_number); if (args == NULL){ print_err("IRJIT: ERROR = Malloc return an error. ", errno); return CANNOT_ALLOCATE_MEMORY; } item = g_list_first((inst->IO).params); assert(item != NULL); count = 0; while (item != NULL){ param = (t_stack_item *) item->data; assert(param != NULL); /* Create the argument */ v_args[count] = make_constant (method->getIRMethod(method), param); assert(v_args[count] != NULL); /* Fetch the next parameter */ count++; item = g_list_next(item); } assert(count == v_args_number); PDEBUG("IRJIT: Create the call to the correct method returned by the virtual call handler\n"); switch ((inst->result).type){ case IROFFSET: assert(v_args != NULL); method->getIRMethod(method)->locals[(inst->result).value] = jit_insn_call_indirect_vtable(method->getJITFunction(method), v_method, NULL, v_args, v_args_number, 0); assert(method->getIRMethod(method)->locals[(inst->result).value] != NULL);