From f0f113da2bf8ddb891716cca549e83e24fcc2545 Mon Sep 17 00:00:00 2001 From: gambas Date: Fri, 16 Nov 2018 01:33:51 +0100 Subject: [PATCH] Correctly restore EP after it has been used by the translation of the TRY instruction. [GB.JIT] * BUG: Correctly restore EP after it has been used by the translation of the TRY instruction. --- main/lib/jit/jit_body.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/lib/jit/jit_body.c b/main/lib/jit/jit_body.c index 81e070609..7a3effc69 100644 --- a/main/lib/jit/jit_body.c +++ b/main/lib/jit/jit_body.c @@ -3244,8 +3244,8 @@ _QUIT: _TRY: - //declare(&_decl_tp, "VALUE *tp"); - JIT_print(" EP = sp;\n"); + declare(&_decl_tp, "VALUE *tp"); + JIT_print(" tp = EP; EP = sp;\n"); JIT_print(" TRY {\n"); p++; goto _MAIN; @@ -3262,7 +3262,7 @@ _END_TRY: JIT_print(" *JIT.got_error = 1;\n"); JIT_print(" JIT.error_set_last(FALSE);\n"); JIT_print(" } END_TRY\n"); - JIT_print(" EP = NULL;\n"); + JIT_print(" EP = tp;\n"); goto _MAIN; _CATCH: