From 91b92fa8934fd7bb703339e2a95ed56909bff1a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 3 Apr 2020 18:06:13 +0200 Subject: [PATCH] :art: Remove faulty release --- src/emit/emit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.43.0