Fix Eval() and fix error management on disabled fast functions.

[INTERPRETER]
* BUG: Fix Eval().
* BUG: Fix error management on disabled fast functions.
This commit is contained in:
gambas 2021-06-12 12:02:39 +02:00
parent b24029f722
commit 3d41de69d4
2 changed files with 5 additions and 3 deletions

View file

@ -994,7 +994,7 @@ void EXEC_function_loop()
ERROR_set_last(TRUE); 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(); ERROR_hook();
@ -1018,11 +1018,11 @@ void EXEC_function_loop()
// We can only leave stack frames for non-JIT functions. // We can only leave stack frames for non-JIT functions.
ERROR_lock(); ERROR_lock();
while (PC != NULL && EC == NULL && !FP->fast) while (PC != NULL && EC == NULL && !FP->fast_linked)
EXEC_leave_drop(); EXEC_leave_drop();
ERROR_unlock(); ERROR_unlock();
if (FP && FP->fast) if (FP && FP->fast_linked)
PROPAGATE(); PROPAGATE();
// If we got the void stack frame, then we remove it and raise the error again // If we got the void stack frame, then we remove it and raise the error again

View file

@ -315,6 +315,8 @@ void SUBR_eval(ushort code)
if (!EVAL.Run(eval, get_value)) if (!EVAL.Run(eval, get_value))
goto _ERROR; goto _ERROR;
*RP = TEMP;
TEMP.type = T_VOID;
goto _FREE; goto _FREE;
_ERROR: _ERROR: