mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Issue #3049 - Disable native regexp JIT on loongarch64
This commit is contained in:
parent
499987e0f9
commit
9d44c48014
4 changed files with 12 additions and 2 deletions
|
|
@ -301,6 +301,11 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
|
|||
useIon = false;
|
||||
#endif
|
||||
|
||||
bool useNativeRegExp = GetWorkerPref<bool>(NS_LITERAL_CSTRING("native_regexp"));
|
||||
#if defined(JS_CODEGEN_LOONGARCH64)
|
||||
useNativeRegExp = false;
|
||||
#endif
|
||||
|
||||
JS::ContextOptions contextOptions;
|
||||
contextOptions.setAsmJS(useAsmJS)
|
||||
.setWasm(useWasm)
|
||||
|
|
@ -308,7 +313,7 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
|
|||
NS_LITERAL_CSTRING("throw_on_asmjs_validation_failure")))
|
||||
.setBaseline(GetWorkerPref<bool>(NS_LITERAL_CSTRING("baselinejit")))
|
||||
.setIon(useIon)
|
||||
.setNativeRegExp(GetWorkerPref<bool>(NS_LITERAL_CSTRING("native_regexp")))
|
||||
.setNativeRegExp(useNativeRegExp)
|
||||
.setAsyncStack(GetWorkerPref<bool>(NS_LITERAL_CSTRING("asyncstack")))
|
||||
.setWerror(GetWorkerPref<bool>(NS_LITERAL_CSTRING("werror")))
|
||||
.setStreams(GetWorkerPref<bool>(NS_LITERAL_CSTRING("streams")))
|
||||
|
|
|
|||
|
|
@ -1251,7 +1251,7 @@ SampleChars(FrequencyCollator* collator, const CharT* chars, size_t length)
|
|||
static bool
|
||||
IsNativeRegExpEnabled(JSContext* cx)
|
||||
{
|
||||
#ifdef JS_CODEGEN_NONE
|
||||
#if defined(JS_CODEGEN_NONE) || defined(JS_CODEGEN_LOONGARCH64)
|
||||
return false;
|
||||
#else
|
||||
return cx->options().nativeRegExp();
|
||||
|
|
|
|||
|
|
@ -1426,6 +1426,7 @@ ReloadPrefsCallback(const char* pref, void* data)
|
|||
useAsmJS = false;
|
||||
useWasm = false;
|
||||
useWasmBaseline = false;
|
||||
useNativeRegExp = false;
|
||||
#endif
|
||||
|
||||
bool parallelParsing = Preferences::GetBool(JS_OPTIONS_DOT_STR "parallel_parsing");
|
||||
|
|
|
|||
|
|
@ -1289,7 +1289,11 @@ pref("javascript.options.wasm_baselinejit", true);
|
|||
#else
|
||||
pref("javascript.options.wasm_baselinejit", false);
|
||||
#endif
|
||||
#ifdef JS_CODEGEN_LOONGARCH64
|
||||
pref("javascript.options.native_regexp", false);
|
||||
#else
|
||||
pref("javascript.options.native_regexp", true);
|
||||
#endif
|
||||
pref("javascript.options.parallel_parsing", true);
|
||||
// asyncstack is used for debugging promises in devtools.
|
||||
pref("javascript.options.asyncstack", false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue