]> Nishi Git Mirror - gwion.git/commitdiff
:art: Remove useless gack instructions
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 3 Mar 2020 15:47:50 +0000 (16:47 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Tue, 3 Mar 2020 15:47:50 +0000 (16:47 +0100)
src/emit/emit.c

index f002c3a40a26b930f0bcd2869a84dd565e5f2cd6..2a73a28c71cb1a2675a1acc9b831458ca030fd92 100644 (file)
@@ -619,12 +619,9 @@ ANN static m_bool emit_interp(const Emitter emit, const Exp exp) {
       return GW_ERROR;
     }
     regseti(emit, (m_uint)e->type);
-    if(isa(e->type, emit->gwion->type[et_object]) > 0 && !GET_FLAG(e->type, force)) {
-      emit_add_instr(emit, GackType);
-    }
-    const Instr instr = emit_add_instr(emit, Gack);
     if(isa(e->type, emit->gwion->type[et_object]) > 0 && !GET_FLAG(e->type, force))
       emit_add_instr(emit, GackType);
+    const Instr instr = emit_add_instr(emit, Gack);
     instr->m_val = emit_code_offset(emit);
   } while((e = e->next = next));
   return GW_OK;