mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #3049 - Disable unsupported JIT features in loongarch64 contexts
This commit is contained in:
parent
a3d0442265
commit
08d7b89ee5
3 changed files with 33 additions and 4 deletions
|
|
@ -290,13 +290,24 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context options.
|
// Context options.
|
||||||
|
bool useAsmJS = GetWorkerPref<bool>(NS_LITERAL_CSTRING("asmjs"));
|
||||||
|
bool useWasm = GetWorkerPref<bool>(NS_LITERAL_CSTRING("wasm"));
|
||||||
|
bool useIon = GetWorkerPref<bool>(NS_LITERAL_CSTRING("ion"));
|
||||||
|
|
||||||
|
#if defined(JS_CODEGEN_LOONGARCH64)
|
||||||
|
// The loongarch64 port is baseline-only for now.
|
||||||
|
useAsmJS = false;
|
||||||
|
useWasm = false;
|
||||||
|
useIon = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
JS::ContextOptions contextOptions;
|
JS::ContextOptions contextOptions;
|
||||||
contextOptions.setAsmJS(GetWorkerPref<bool>(NS_LITERAL_CSTRING("asmjs")))
|
contextOptions.setAsmJS(useAsmJS)
|
||||||
.setWasm(GetWorkerPref<bool>(NS_LITERAL_CSTRING("wasm")))
|
.setWasm(useWasm)
|
||||||
.setThrowOnAsmJSValidationFailure(GetWorkerPref<bool>(
|
.setThrowOnAsmJSValidationFailure(GetWorkerPref<bool>(
|
||||||
NS_LITERAL_CSTRING("throw_on_asmjs_validation_failure")))
|
NS_LITERAL_CSTRING("throw_on_asmjs_validation_failure")))
|
||||||
.setBaseline(GetWorkerPref<bool>(NS_LITERAL_CSTRING("baselinejit")))
|
.setBaseline(GetWorkerPref<bool>(NS_LITERAL_CSTRING("baselinejit")))
|
||||||
.setIon(GetWorkerPref<bool>(NS_LITERAL_CSTRING("ion")))
|
.setIon(useIon)
|
||||||
.setNativeRegExp(GetWorkerPref<bool>(NS_LITERAL_CSTRING("native_regexp")))
|
.setNativeRegExp(GetWorkerPref<bool>(NS_LITERAL_CSTRING("native_regexp")))
|
||||||
.setAsyncStack(GetWorkerPref<bool>(NS_LITERAL_CSTRING("asyncstack")))
|
.setAsyncStack(GetWorkerPref<bool>(NS_LITERAL_CSTRING("asyncstack")))
|
||||||
.setWerror(GetWorkerPref<bool>(NS_LITERAL_CSTRING("werror")))
|
.setWerror(GetWorkerPref<bool>(NS_LITERAL_CSTRING("werror")))
|
||||||
|
|
|
||||||
|
|
@ -1420,6 +1420,14 @@ ReloadPrefsCallback(const char* pref, void* data)
|
||||||
"throw_on_asmjs_validation_failure");
|
"throw_on_asmjs_validation_failure");
|
||||||
bool useNativeRegExp = Preferences::GetBool(JS_OPTIONS_DOT_STR "native_regexp") && !safeMode;
|
bool useNativeRegExp = Preferences::GetBool(JS_OPTIONS_DOT_STR "native_regexp") && !safeMode;
|
||||||
|
|
||||||
|
#if defined(JS_CODEGEN_LOONGARCH64)
|
||||||
|
// The loongarch64 port is baseline-only for now.
|
||||||
|
useIon = false;
|
||||||
|
useAsmJS = false;
|
||||||
|
useWasm = false;
|
||||||
|
useWasmBaseline = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool parallelParsing = Preferences::GetBool(JS_OPTIONS_DOT_STR "parallel_parsing");
|
bool parallelParsing = Preferences::GetBool(JS_OPTIONS_DOT_STR "parallel_parsing");
|
||||||
bool offthreadIonCompilation = Preferences::GetBool(JS_OPTIONS_DOT_STR
|
bool offthreadIonCompilation = Preferences::GetBool(JS_OPTIONS_DOT_STR
|
||||||
"ion.offthread_compilation");
|
"ion.offthread_compilation");
|
||||||
|
|
|
||||||
|
|
@ -1263,8 +1263,12 @@ pref("javascript.options.strict.debug", false);
|
||||||
#endif
|
#endif
|
||||||
pref("javascript.options.unboxed_objects", false);
|
pref("javascript.options.unboxed_objects", false);
|
||||||
pref("javascript.options.baselinejit", true);
|
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", true);
|
||||||
pref("javascript.options.ion.inlining", true);
|
|
||||||
// JIT warm-up thresholds (-1 keeps engine defaults).
|
// JIT warm-up thresholds (-1 keeps engine defaults).
|
||||||
// Lower values can improve sustained throughput on large script bundles
|
// Lower values can improve sustained throughput on large script bundles
|
||||||
// (e.g. React/jQuery-heavy apps) at some startup compile cost.
|
// (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.ion.threshold", 50);
|
||||||
pref("javascript.options.asmjs", true);
|
pref("javascript.options.asmjs", true);
|
||||||
pref("javascript.options.wasm", true);
|
pref("javascript.options.wasm", true);
|
||||||
|
#endif
|
||||||
|
pref("javascript.options.ion.inlining", true);
|
||||||
// wasm jit crashes in 32bit builds because of 64bit casts so
|
// wasm jit crashes in 32bit builds because of 64bit casts so
|
||||||
// only enable it by default for 64bit builds
|
// only enable it by default for 64bit builds
|
||||||
#ifdef HAVE_64BIT_BUILD
|
#ifdef HAVE_64BIT_BUILD
|
||||||
|
# if defined(JS_CODEGEN_LOONGARCH64)
|
||||||
|
pref("javascript.options.wasm_baselinejit", false);
|
||||||
|
# else
|
||||||
pref("javascript.options.wasm_baselinejit", true);
|
pref("javascript.options.wasm_baselinejit", true);
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
pref("javascript.options.wasm_baselinejit", false);
|
pref("javascript.options.wasm_baselinejit", false);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue