}
ANN static m_bool emit_exp_lambda(const Emitter emit, const Exp_Lambda * lambda) {
- assert(lambda->def);
+ if(!lambda->def) {
+ regpushi(emit, SZ_INT);
+ return GW_OK;
+ }
const m_uint scope = !lambda->owner ?
emit->env->scope->depth : emit_push_type(emit, lambda->owner);
const m_bool ret = emit_lambda(emit, lambda);
e->next = next;
CHECK_BB(ret)
const Exp_Binary bin = { .lhs=base, .rhs=e, .op=op };
- struct Exp_ ebin = { .d={.exp_binary=bin}, .nspc=emit->env->curr};
+ struct Exp_ ebin = { .d={.exp_binary=bin}, .nspc=e->nspc};
struct Op_Import opi = { .op=op, .lhs=base->type, .rhs=e->type, .data=(uintptr_t)&ebin.d.exp_binary, .pos=e->pos };
CHECK_BB(op_emit_bool(emit, &opi))
const Instr instr = emit_add_instr(emit, BranchEqInt);
struct Exp_ ebin = { .d={.exp_binary=bin}, .nspc=env->curr};
struct Op_Import opi = { .op=op, .lhs=base->type, .rhs=e->type, .data=(uintptr_t)&ebin.d.exp_binary, .pos=e->pos };
CHECK_OB(op_check(env, &opi))
+ e->nspc= ebin.nspc;
+ return GW_OK;
}
}
if(e)
}
ANN static Enum_Def cpy_enum_def(MemPool p, const Enum_Def src) {
- Enum_Def a = mp_calloc(p, Func_Base);
+ Enum_Def a = mp_calloc(p, Enum_Def);
a->list = cpy_id_list(p, src->list);
a->xid = src->xid;
a->flag = src->flag;
+ vector_init(&a->values);
return a;
}