From: Jérémie Astor Date: Fri, 3 Apr 2020 16:06:13 +0000 (+0200) Subject: :art: Remove faulty release X-Git-Tag: nightly~1712 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=91b92fa8934fd7bb703339e2a95ed56909bff1a2;p=gwion.git :art: Remove faulty release --- diff --git a/src/emit/emit.c b/src/emit/emit.c index 87b0d2d0..2308b3d7 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1409,7 +1409,7 @@ ANN static m_bool emit_stmt_auto(const Emitter emit, const Stmt_Auto stmt) { 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; - emit_local(emit, emit->gwion->type[et_int]); + emit_local(emit, emit->gwion->type[et_int]); // is ptr released? const m_uint offset = emit_local(emit, emit->gwion->type[et_int]); stmt->v->from->offset = offset + SZ_INT; const m_uint ini_pc = emit_code_size(emit); @@ -1426,8 +1426,6 @@ ANN static m_bool emit_stmt_auto(const Emitter emit, const Stmt_Auto stmt) { end->m_val = emit_code_size(emit); tgt->m_val = ini_pc; s1->m_val = loop->m_val = offset; - if(stmt->is_ptr) - emit_add_instr(emit, ObjectRelease); regpop(emit, SZ_INT); emit_pop_stack(emit, end_pc); return GW_OK;