Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
roytam1 2020-12-04 08:53:18 +08:00
commit 10126898e3
6 changed files with 13 additions and 3 deletions

View file

@ -299,10 +299,11 @@ nsJSUtils::CompileModule(JSContext* aCx,
NS_ENSURE_TRUE(xpc::Scriptability::Get(aEvaluationGlobal).Allowed(), NS_OK); NS_ENSURE_TRUE(xpc::Scriptability::Get(aEvaluationGlobal).Allowed(), NS_OK);
if (!JS::CompileModule(aCx, aCompileOptions, aSrcBuf, aModule)) { bool compileResult = JS::CompileModule(aCx, aCompileOptions, aSrcBuf, aModule);
if (!compileResult) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
return NS_OK; return NS_OK;
} }

View file

@ -96,7 +96,7 @@ DefaultJitOptions::DefaultJitOptions()
SET_DEFAULT(disableGvn, false); SET_DEFAULT(disableGvn, false);
// Toggles whether inlining is globally disabled. // Toggles whether inlining is globally disabled.
SET_DEFAULT(disableInlining, true); SET_DEFAULT(disableInlining, false);
// Toggles whether loop invariant code motion is globally disabled. // Toggles whether loop invariant code motion is globally disabled.
SET_DEFAULT(disableLicm, false); SET_DEFAULT(disableLicm, false);

View file

@ -6607,6 +6607,9 @@ JS_SetGlobalJitCompilerOption(JSContext* cx, JSJitCompilerOption opt, uint32_t v
case JSJITCOMPILER_ION_INTERRUPT_WITHOUT_SIGNAL: case JSJITCOMPILER_ION_INTERRUPT_WITHOUT_SIGNAL:
jit::JitOptions.ionInterruptWithoutSignals = !!value; jit::JitOptions.ionInterruptWithoutSignals = !!value;
break; break;
case JSJITCOMPILER_ION_INLINING:
jit::JitOptions.disableInlining = !value;
break;
default: default:
break; break;
} }

View file

@ -5905,6 +5905,7 @@ JS_SetOffthreadIonCompilationEnabled(JSContext* cx, bool enabled);
Register(ION_GVN_ENABLE, "ion.gvn.enable") \ Register(ION_GVN_ENABLE, "ion.gvn.enable") \
Register(ION_FORCE_IC, "ion.forceinlineCaches") \ Register(ION_FORCE_IC, "ion.forceinlineCaches") \
Register(ION_ENABLE, "ion.enable") \ Register(ION_ENABLE, "ion.enable") \
Register(ION_INLINING, "ion.inlining") \
Register(ION_INTERRUPT_WITHOUT_SIGNAL, "ion.interrupt-without-signals") \ Register(ION_INTERRUPT_WITHOUT_SIGNAL, "ion.interrupt-without-signals") \
Register(ION_CHECK_RANGE_ANALYSIS, "ion.check-range-analysis") \ Register(ION_CHECK_RANGE_ANALYSIS, "ion.check-range-analysis") \
Register(BASELINE_ENABLE, "baseline.enable") \ Register(BASELINE_ENABLE, "baseline.enable") \

View file

@ -1428,6 +1428,8 @@ ReloadPrefsCallback(const char* pref, void* data)
bool unboxedObjects = Preferences::GetBool(JS_OPTIONS_DOT_STR "unboxed_objects"); bool unboxedObjects = Preferences::GetBool(JS_OPTIONS_DOT_STR "unboxed_objects");
bool inlining = Preferences::GetBool(JS_OPTIONS_DOT_STR "ion.inlining");
sSharedMemoryEnabled = Preferences::GetBool(JS_OPTIONS_DOT_STR "shared_memory"); sSharedMemoryEnabled = Preferences::GetBool(JS_OPTIONS_DOT_STR "shared_memory");
#ifdef DEBUG #ifdef DEBUG
@ -1458,6 +1460,8 @@ ReloadPrefsCallback(const char* pref, void* data)
useIonEager ? 0 : -1); useIonEager ? 0 : -1);
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_UNBOXED_OBJECTS, JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_UNBOXED_OBJECTS,
unboxedObjects); unboxedObjects);
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_ION_INLINING,
inlining);
} }
XPCJSContext::~XPCJSContext() XPCJSContext::~XPCJSContext()

View file

@ -1272,6 +1272,7 @@ pref("javascript.options.strict.debug", false);
pref("javascript.options.unboxed_objects", false); pref("javascript.options.unboxed_objects", false);
pref("javascript.options.baselinejit", true); pref("javascript.options.baselinejit", true);
pref("javascript.options.ion", true); pref("javascript.options.ion", true);
pref("javascript.options.ion.inlining", false);
pref("javascript.options.asmjs", true); pref("javascript.options.asmjs", true);
pref("javascript.options.wasm", true); pref("javascript.options.wasm", true);
// wasm jit crashes in 32bit builds because of 64bit casts so // wasm jit crashes in 32bit builds because of 64bit casts so