On 12/03/2020 18:55, Jacek Caban wrote:
Hi Gabriel,
On 12.03.2020 17:35, Gabriel Ivăncescu wrote:
@@ -2997,6 +2998,18 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi } } + if(flags & (EXEC_GLOBAL | EXEC_EVAL)) { + if(ctx->call_ctx) + variable_obj = ctx->call_ctx->variable_obj;
I think that only eval() should inherit caller's variable_obj. It would be even better to do that only for eval with EXEC_RETURN_TO_INTERP.
Thanks,
Jacek
If I include EXEC_RETURN_TO_INTERP, it has test failures in run.c, I'll send one with just EXEC_EVAL instead.