ANN2(1,2) m_bool emit_instantiate_object(const Emitter, const Type, const Array_Sub, const m_bool);
ANN m_uint emit_code_offset(const Emitter emit);
ANN m_uint emit_local(const Emitter emit, const Type t);
-ANN Instr emit_exp_spork(const Emitter, const Exp_Unary*);
+ANN m_bool emit_exp_spork(const Emitter, const Exp_Unary*);
ANN m_bool emit_exp(const Emitter, const Exp);
-ANN static inline Instr emit_gc(const Emitter emit, const m_int offset) {
+ANN static inline void emit_gc(const Emitter emit, const m_int offset) {
const Instr gc = emit_add_instr(emit, GcAdd);
gc->m_val = offset;
- return gc;
}
#endif
m_str ret;
Symbol sym;
Type (*ck)(Env, void*, m_bool*); // oper
- Instr (*em)(Emitter, void*); // oper
+ m_bool (*em)(Emitter, void*); // oper
m_str lhs;// oper
m_str rhs;// oper
} OperCK;
(void)emit_add_instr(emit, SporkEnd);
}
-ANN static Instr spork_ini(const Emitter emit, const struct Sporker *sp) {
+ANN static void spork_ini(const Emitter emit, const struct Sporker *sp) {
if(sp->is_spork) {
const Instr instr = emit_add_instr(emit, SporkIni);
instr->m_val = (m_uint)sp->vm_code;
instr->m_val2 = sp->is_spork;
- return instr;
+ return;
}
regpushi(emit, (m_uint)sp->type);
const Instr instr = emit_add_instr(emit, ForkIni);
instr->m_val = (m_uint)sp->vm_code;
instr->m_val2 = sp->type->size;
- return instr;
}
-ANN Instr emit_exp_spork(const Emitter emit, const Exp_Unary* unary) {
+ANN m_bool emit_exp_spork(const Emitter emit, const Exp_Unary* unary) {
struct Sporker sporker = {
.exp=unary->exp,
.code=unary->code,
.is_spork=(unary->op == insert_symbol("spork")),
.emit_var=exp_getvar(exp_self(unary))
};
- CHECK_OO((sporker.vm_code = spork_prepare(emit, &sporker)))
- const Instr ini = spork_ini(emit, &sporker);
+ CHECK_OB((sporker.vm_code = spork_prepare(emit, &sporker)))
+ spork_ini(emit, &sporker);
(unary->code ? spork_code : spork_func)(emit, &sporker);
- return ini;
+ return GW_OK;
}
ANN static m_bool emit_exp_unary(const Emitter emit, const Exp_Unary* unary) {
Exp_Binary* bin = (Exp_Binary*)data;
if(bin->rhs->info->type->info->func->def->base->tmpl)
fptr_instr(emit, bin->lhs->info->type->info->func, 2);
- const Instr instr = emit_add_instr(emit, int_r_assign);
+ (void)emit_add_instr(emit, int_r_assign);
if(!is_fptr(emit->gwion, bin->lhs->info->type) && vflag(bin->rhs->info->type->info->func->value_ref, vflag_member)) {
const Instr pop = emit_add_instr(emit, RegPop);
pop->m_val = SZ_INT;
OP_EMIT(opem_new) {
const Exp_Unary* unary = (Exp_Unary*)data;
- CHECK_BO(emit_instantiate_object(emit, exp_self(unary)->info->type,
+ CHECK_BB(emit_instantiate_object(emit, exp_self(unary)->info->type,
unary->td->array, 0))
emit_gc(emit, -SZ_INT);
return GW_OK;