From 3d41de69d41fa809b6a14f0a7f24ea75810206e8 Mon Sep 17 00:00:00 2001 From: gambas Date: Sat, 12 Jun 2021 12:02:39 +0200 Subject: [PATCH] Fix Eval() and fix error management on disabled fast functions. [INTERPRETER] * BUG: Fix Eval(). * BUG: Fix error management on disabled fast functions. --- main/gbx/gbx_exec.c | 6 +++--- main/gbx/gbx_subr_misc.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main/gbx/gbx_exec.c b/main/gbx/gbx_exec.c index 725c39acb..f8974b7d1 100644 --- a/main/gbx/gbx_exec.c +++ b/main/gbx/gbx_exec.c @@ -994,7 +994,7 @@ void EXEC_function_loop() ERROR_set_last(TRUE); - if (EXEC_debug && !FP->fast && !STACK_has_error_handler()) + if (EXEC_debug && !FP->fast_linked && !STACK_has_error_handler()) { ERROR_hook(); @@ -1018,11 +1018,11 @@ void EXEC_function_loop() // We can only leave stack frames for non-JIT functions. ERROR_lock(); - while (PC != NULL && EC == NULL && !FP->fast) + while (PC != NULL && EC == NULL && !FP->fast_linked) EXEC_leave_drop(); ERROR_unlock(); - if (FP && FP->fast) + if (FP && FP->fast_linked) PROPAGATE(); // If we got the void stack frame, then we remove it and raise the error again diff --git a/main/gbx/gbx_subr_misc.c b/main/gbx/gbx_subr_misc.c index b7462edfc..43f572a1c 100644 --- a/main/gbx/gbx_subr_misc.c +++ b/main/gbx/gbx_subr_misc.c @@ -315,6 +315,8 @@ void SUBR_eval(ushort code) if (!EVAL.Run(eval, get_value)) goto _ERROR; + *RP = TEMP; + TEMP.type = T_VOID; goto _FREE; _ERROR: