]> Nishi Git Mirror - gwion.git/commitdiff
:bomb: Returned Objects do not need ref
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 13 Apr 2020 21:03:15 +0000 (23:03 +0200)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Mon, 13 Apr 2020 21:03:15 +0000 (23:03 +0200)
src/emit/emit.c

index 6a66eab44d05ab81f6abf07d1389cf141f5fc1dd..84d3ef4bc6785ee470f6dd2337bbea9fb32e2189 100644 (file)
@@ -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;