From 09dfeddef5a3d37278c793911ed40c9dd9e15613 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 13 Apr 2020 23:03:15 +0200 Subject: [PATCH] :bomb: Returned Objects do not need ref --- src/emit/emit.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 6a66eab4..84d3ef4b 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1297,8 +1297,6 @@ ANN static m_bool emit_stmt_return(const Emitter emit, const Stmt_Exp stmt) { if(stmt->val->exp_type == ae_exp_call && emit->env->func == stmt->val->d.exp_call.m_func) return optimize_taill_call(emit, &stmt->val->d.exp_call); CHECK_BB(emit_exp_pop_next(emit, stmt->val)) - if(isa(stmt->val->info->type, emit->gwion->type[et_object]) > 0) - (void)emit_addref(emit, 0); } vector_add(&emit->code->stack_return, (vtype)emit_add_instr(emit, Goto)); return GW_OK; -- 2.43.0