Issue #3049 - Disable unsupported JIT features in loongarch64 contexts

This commit is contained in:
Basilisk-Dev 2026-04-23 21:42:15 -04:00 committed by wuggy
commit 08d7b89ee5
3 changed files with 33 additions and 4 deletions

View file

@ -1263,8 +1263,12 @@ pref("javascript.options.strict.debug", false);
#endif
pref("javascript.options.unboxed_objects", false);
pref("javascript.options.baselinejit", true);
#if defined(JS_CODEGEN_LOONGARCH64)
pref("javascript.options.ion", false);
pref("javascript.options.asmjs", false);
pref("javascript.options.wasm", false);
#else
pref("javascript.options.ion", true);
pref("javascript.options.ion.inlining", true);
// JIT warm-up thresholds (-1 keeps engine defaults).
// Lower values can improve sustained throughput on large script bundles
// (e.g. React/jQuery-heavy apps) at some startup compile cost.
@ -1272,10 +1276,16 @@ pref("javascript.options.baselinejit.threshold", 6);
pref("javascript.options.ion.threshold", 50);
pref("javascript.options.asmjs", true);
pref("javascript.options.wasm", true);
#endif
pref("javascript.options.ion.inlining", true);
// wasm jit crashes in 32bit builds because of 64bit casts so
// only enable it by default for 64bit builds
#ifdef HAVE_64BIT_BUILD
# if defined(JS_CODEGEN_LOONGARCH64)
pref("javascript.options.wasm_baselinejit", false);
# else
pref("javascript.options.wasm_baselinejit", true);
# endif
#else
pref("javascript.options.wasm_baselinejit", false);
#endif