Skip to content
Snippets Groups Projects
Commit 8f4425cb authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Enable JSOPTION_VAROBJFIX for JSDoor.

This option fixes the fact that the following two lines sometimes
place the variables in different scopes at the top-level of included
scripts:
var x = 1;
y = 2;

I plan to use this to experiment on if this is what's causing much
of the remaining scope chain weirdness... it certain explains some
things we've been seeing (and possibly even things like the METHODJIT
issues DigitalMan saw yesterday).

Enabling in sbbs/jsexec is a much bigger lift, but this change may
end up being all upside... the docs have suggested this option always
be set since it was originally introduced, and now that I understand
scopes better, it's pretty clear why that is.
parent d8c73bac
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1442 passed
......@@ -59,7 +59,7 @@ ulong js_max_bytes=JAVASCRIPT_MAX_BYTES;
#ifndef JSDOOR
ulong js_opts = JAVASCRIPT_OPTIONS;
#else
ulong js_opts = JSOPTION_JIT | JSOPTION_METHODJIT | JSOPTION_COMPILE_N_GO | JSOPTION_PROFILING;
ulong js_opts = JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT | JSOPTION_COMPILE_N_GO | JSOPTION_PROFILING;
#endif
FILE* confp;
FILE* errfp;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment