integ: merge fix/fjit-default-off 211ed107

This commit is contained in:
velzie committed 2026-10-12 10:27:05 -04:00
commit 3d1de75275
1 file changed
+6 -8
+6 -8
View File
@@ -116,15 +116,13 @@ async function main() {
// `?mem64=1`: a 64-bit guest memory (the wasm64 shim; docs/mem64.md step 6).
if (q.get('mem64') === '1') globalThis.GEX_MEM64 = 1;
// `?fjit=1`: the function JIT (gexc run --fjit's browser half, fjit.rs);
// `?fjit=2` traces it, `?fjit=0` turns it off. On by default for Wine's
// own loader (W3, `exe=.../lib/wine/<arch>-unix/wine`): code no
// function-tier unit holds otherwise runs on tier-1 behind the units'
// fallback, and Undertale drops from its 30 fps cap to ~15 in some
// scenes (worldmachine, units-ut2: 23.1 fps over 120 s without, a flat
// 30.0 with).
// `?fjit=2` traces it, `?fjit=0` turns it off. Off by default: it serves
// every cold tier-1 miss, which doubles a W3 program's start-up (Undertale's
// first frame 28.6 s with `?fjit=1`, 16.4 s without; worldmachine,
// units-ut3) for about 3% of steady fps there (18.2 vs 17.9). It comes back
// as the default once it waits for a block to be hot.
const fjitQ = q.get('fjit');
const w3Loader = /\/lib\/wine\/[^/]+-unix\/wine$/.test(q.get('exe') || '');
if (fjitQ !== null ? fjitQ !== '0' : w3Loader) globalThis.GEX_FJIT = Number(fjitQ) || 1;
if (fjitQ !== null && fjitQ !== '0') globalThis.GEX_FJIT = Number(fjitQ) || 1;
// `?wasmdlls=soname=path,...`: shared objects replaced by wasm64 providers (cgen/libprov.rs).
if (q.get('wasmdlls')) globalThis.GEX_WASM_DLLS = q.get('wasmdlls');
// `?elfunits=name,...`: shared objects that get function-tier units (with `?cgen=1`).