ANN static m_bool emit_stmt_auto(const Emitter emit, const Stmt_Auto stmt) { GWDEBUG_EXE
CHECK_BB(emit_exp(emit, stmt->exp, 0))
const Instr s1 = emit_add_instr(emit, MemSetImm);
+ emit_push_stack(emit);
Instr cpy = stmt->is_ptr ? emit_stmt_autoptr_init(emit, stmt->v->type) : NULL;
const m_uint ini_pc = emit_code_size(emit);
- emit_push_stack(emit);
emit_add_instr(emit, GWOP_EXCEPT);
const Instr loop = emit_add_instr(emit, stmt->is_ptr ? AutoLoopPtr : AutoLoop);
const Instr end = emit_add_instr(emit, BranchEqInt);
if(stmt->is_ptr) {
loop->m_val2 = (m_uint)stmt->v->type;
cpy->m_val = stmt->v->offset;
- const Instr release = emit_add_instr(emit, ObjectRelease);
- release->m_val = stmt->v->offset;
}
const Instr tgt = emit_add_instr(emit, Goto);
end->m_val = emit_code_size(emit);