const Type t = actual_type(emit->gwion, exp_call->func->type);
const Func f = t->info->func;
if (is_fptr(emit->gwion, t) || strstr(emit->code->name, "ork~") ||
- (f != emit->env->func || f->value_ref->from->owner_class))
+ (f != emit->env->func || (f && f->value_ref->from->owner_class)))
CHECK_BB(prepare_call(emit, exp_call));
else
CHECK_BB(emit_func_args(emit, exp_call));
static INSTR(UnionCtor) {
POP_REG(shred, instr->m_val2);
- POP_REG(shred, SZ_INT);
const m_uint index = *(m_uint *)REG(-SZ_INT);
const M_Object o = *(M_Object *)REG(-SZ_INT) =
new_object(shred->info->mp, NULL, (Type)instr->m_val);
}
static OP_EMIT(opem_union_ctor) {
- Exp_Call * call = (Exp_Call *)data;
- const Type base = actual_type(emit->gwion, call->func->type);
- const Instr instr = emit_add_instr(emit, UnionCtor);
- instr->m_val = (m_uint)base;
- instr->m_val2 = call->args->next->type->size;
+ Exp_Call *const call = (Exp_Call *)data;
+ const Type base = actual_type(emit->gwion, call->func->type);
+ const Instr instr = emit_add_instr(emit, UnionCtor);
+ instr->m_val = (m_uint)base;
+ instr->m_val2 = call->args->next->type->size;
return GW_OK;
}