From 056d6d0273ce7cf91d39aa843e5686a401b12ba3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 24 Mar 2022 11:36:10 +0100 Subject: [PATCH] :bug: re-allow tests on late values -> free instruction --- src/emit/emit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 6a138250..678eae0c 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1961,8 +1961,12 @@ ANN2(1,2) static Instr _flow(const Emitter emit, const Exp e, Instr *const instr CHECK_BO(emit_exp(emit, e)); { const Instr instr = (Instr)vector_back(&emit->code->instr); - if(instr->execute == fast_except) + if(instr->execute == fast_except) { vector_rem(&emit->code->instr, vector_size(&emit->code->instr) - 1); + if(instr->m_val2) + mp_free2(emit->gwion->mp, sizeof(struct FastExceptInfo), (struct FastExceptInfo*)instr->m_val2); + free_instr(emit->gwion, instr); + } } if(instr) *instr = emit_add_instr(emit, NoOp); -- 2.43.0