diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 5b2565a3db69..a200fe560fa6 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -957,7 +957,7 @@ static bool EnableOsiPointRegisterChecks(JSContext *, unsigned, jsval *vp) { #if defined(JS_ION) && defined(CHECK_OSIPOINT_REGISTERS) - jit::js_IonOptions.checkOsiPointRegisters = true; + jit::js_JitOptions.checkOsiPointRegisters = true; #endif JS_SET_RVAL(cx, vp, JSVAL_VOID); return true; @@ -1140,7 +1140,7 @@ SetIonCheckGraphCoherency(JSContext *cx, unsigned argc, jsval *vp) { CallArgs args = CallArgsFromVp(argc, vp); #ifdef JS_ION - jit::js_IonOptions.checkGraphConsistency = ToBoolean(args.get(0)); + jit::js_JitOptions.checkGraphConsistency = ToBoolean(args.get(0)); #endif args.rval().setUndefined(); return true; diff --git a/js/src/jit/Bailouts.cpp b/js/src/jit/Bailouts.cpp index fe49af0216ca..c00f3a893936 100644 --- a/js/src/jit/Bailouts.cpp +++ b/js/src/jit/Bailouts.cpp @@ -196,7 +196,7 @@ jit::CheckFrequentBailouts(JSContext *cx, JSScript *script) // we compile this script LICM will be disabled. IonScript *ionScript = script->ionScript(); - if (ionScript->numBailouts() >= js_IonOptions.frequentBailoutThreshold && + if (ionScript->numBailouts() >= js_JitOptions.frequentBailoutThreshold && !script->hadFrequentBailouts()) { script->setHadFrequentBailouts(); diff --git a/js/src/jit/BaselineJIT.cpp b/js/src/jit/BaselineJIT.cpp index 833a8ca0aaaf..9e1a1ef179a9 100644 --- a/js/src/jit/BaselineJIT.cpp +++ b/js/src/jit/BaselineJIT.cpp @@ -276,7 +276,7 @@ CanEnterBaselineJIT(JSContext *cx, HandleScript script, bool osr) if (IsJSDEnabled(cx) || cx->runtime()->parallelWarmup > 0) { if (osr) return Method_Skipped; - } else if (script->incUseCount() <= js_IonOptions.baselineUsesBeforeCompile) { + } else if (script->incUseCount() <= js_JitOptions.baselineUsesBeforeCompile) { return Method_Skipped; } diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 0aafa73d2312..de320952920b 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -1738,7 +1738,7 @@ IonCompile(JSContext *cx, JSScript *script, ionCompiling.construct(); Maybe protect; - if (js_IonOptions.checkThreadSafety && + if (js_JitOptions.checkThreadSafety && cx->runtime()->gcIncrementalState == gc::NO_INCREMENTAL && !cx->runtime()->profilingScripts && !cx->runtime()->spsProfiler.enabled()) @@ -1822,7 +1822,7 @@ static const uint32_t MAX_DOM_WORKER_LOCALS_AND_ARGS = 2048; static MethodStatus CheckScriptSize(JSContext *cx, JSScript* script) { - if (!js_IonOptions.limitScriptSize) + if (!js_JitOptions.limitScriptSize) return Method_Compiled; if (script->length() > MAX_OFF_THREAD_SCRIPT_SIZE) { @@ -1899,7 +1899,7 @@ Compile(JSContext *cx, HandleScript script, BaselineFrame *osrFrame, jsbytecode JS_ASSERT(jit::IsIonEnabled(cx)); JS_ASSERT(jit::IsBaselineEnabled(cx)); JS_ASSERT_IF(osrPc != nullptr, (JSOp)*osrPc == JSOP_LOOPENTRY); - JS_ASSERT_IF(executionMode == ParallelExecution, !osrFrame && !osrPC); + JS_ASSERT_IF(executionMode == ParallelExecution, !osrFrame && !osrPc); JS_ASSERT_IF(executionMode == ParallelExecution, !HasIonScript(script, executionMode)); if (!script->hasBaselineScript()) @@ -1937,7 +1937,7 @@ Compile(JSContext *cx, HandleScript script, BaselineFrame *osrFrame, jsbytecode // recompile with the right pc. if (osrPc && script->ionScript()->osrPc() != osrPc) { uint32_t count = script->ionScript()->incrOsrPcMismatchCounter(); - if (count <= js_IonOptions.osrPcMismatchesBeforeRecompile) + if (count <= js_JitOptions.osrPcMismatchesBeforeRecompile) return Method_Skipped; failedState = Method_Skipped; @@ -2000,7 +2000,7 @@ jit::CanEnterAtBranch(JSContext *cx, JSScript *script, BaselineFrame *osrFrame, return Method_Skipped; // Optionally ignore on user request. - if (!js_IonOptions.osr) + if (!js_JitOptions.osr) return Method_Skipped; // Mark as forbidden if frame can't be handled. @@ -2083,7 +2083,7 @@ jit::CanEnter(JSContext *cx, RunState &state) // If --ion-eager is used, compile with Baseline first, so that we // can directly enter IonMonkey. RootedScript rscript(cx, script); - if (js_IonOptions.eagerCompilation && !rscript->hasBaselineScript()) { + if (js_JitOptions.eagerCompilation && !rscript->hasBaselineScript()) { MethodStatus status = CanEnterBaselineMethod(cx, state); if (status != Method_Compiled) return status; @@ -2755,7 +2755,7 @@ jit::UsesBeforeIonCompile(JSScript *script, jsbytecode *pc) if (numLocalsAndArgs > MAX_MAIN_THREAD_LOCALS_AND_ARGS) minUses = minUses * (numLocalsAndArgs / (double) MAX_MAIN_THREAD_LOCALS_AND_ARGS); - if (JSOp(*pc) != JSOP_LOOPENTRY || js_IonOptions.eagerCompilation) + if (JSOp(*pc) != JSOP_LOOPENTRY || js_JitOptions.eagerCompilation) return minUses; // It's more efficient to enter outer loops, rather than inner loops, via OSR. diff --git a/js/src/jit/Ion.h b/js/src/jit/Ion.h index 13c202d2b514..178e55202bb3 100644 --- a/js/src/jit/Ion.h +++ b/js/src/jit/Ion.h @@ -16,7 +16,7 @@ #include "jit/CompileInfo.h" #include "jit/CompileWrappers.h" -#include "jit/IonOptions.h" +#include "jit/JitOptions.h" namespace js { namespace jit { @@ -175,7 +175,7 @@ IsIonInlinablePC(jsbytecode *pc) { inline bool TooManyArguments(unsigned nargs) { - return (nargs >= SNAPSHOT_MAX_NARGS || nargs > js_IonOptions.maxStackArgs); + return (nargs >= SNAPSHOT_MAX_NARGS || nargs > js_JitOptions.maxStackArgs); } void ForbidCompilation(JSContext *cx, JSScript *script); diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index c7b750fd61d5..2d94baf95ce0 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -1356,7 +1356,7 @@ void jit::AssertGraphCoherency(MIRGraph &graph) { #ifdef DEBUG - if (!js_IonOptions.checkGraphConsistency) + if (!js_JitOptions.checkGraphConsistency) return; AssertBasicGraphCoherency(graph); AssertReversePostOrder(graph); @@ -1371,7 +1371,7 @@ jit::AssertExtendedGraphCoherency(MIRGraph &graph) // are split) #ifdef DEBUG - if (!js_IonOptions.checkGraphConsistency) + if (!js_JitOptions.checkGraphConsistency) return; AssertGraphCoherency(graph); diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 60bd4745e6d0..7a1b9325b0ce 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -2088,7 +2088,7 @@ IonBuilder::restartLoop(CFGState state) { spew("New types at loop header, restarting loop body"); - if (js_IonOptions.limitScriptSize) { + if (js_JitOptions.limitScriptSize) { if (++numLoopRestarts_ >= MAX_LOOP_RESTARTS) return ControlStatus_Abort; } @@ -3488,7 +3488,7 @@ IonBuilder::jsop_try() { JS_ASSERT(JSOp(*pc) == JSOP_TRY); - if (!js_IonOptions.compileTryCatch) + if (!js_JitOptions.compileTryCatch) return abort("Try-catch support disabled"); // Try-finally is not yet supported. @@ -4046,7 +4046,7 @@ IonBuilder::makeInliningDecision(JSFunction *target, CallInfo &callInfo) // Skip heuristics if we have an explicit hint to inline. if (!targetScript->shouldInline()) { // Cap the inlining depth. - if (js_IonOptions.isSmallFunction(targetScript)) { + if (js_JitOptions.isSmallFunction(targetScript)) { if (inliningDepth_ >= optimizationInfo().smallFunctionMaxInlineDepth()) return DontInline(targetScript, "Vetoed: exceeding allowed inline depth"); } else { diff --git a/js/src/jit/IonFrames.cpp b/js/src/jit/IonFrames.cpp index 340fa16f6ff5..c1a139c80387 100644 --- a/js/src/jit/IonFrames.cpp +++ b/js/src/jit/IonFrames.cpp @@ -1106,7 +1106,7 @@ static void MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations) { #ifdef CHECK_OSIPOINT_REGISTERS - if (js_IonOptions.checkOsiPointRegisters) { + if (js_JitOptions.checkOsiPointRegisters) { // GC can modify spilled registers, breaking our register checks. // To handle this, we disable these checks for the current VM call // when a GC happens. diff --git a/js/src/jit/IonOptimizationLevels.h b/js/src/jit/IonOptimizationLevels.h index 012a07968706..748f73794c49 100644 --- a/js/src/jit/IonOptimizationLevels.h +++ b/js/src/jit/IonOptimizationLevels.h @@ -10,7 +10,7 @@ #include "jsbytecode.h" #include "jstypes.h" -#include "jit/IonOptions.h" +#include "jit/JitOptions.h" #include "js/TypeDecls.h" namespace js { @@ -99,41 +99,41 @@ class OptimizationInfo } bool inlineInterpreted() const { - return inlineInterpreted_ && !js_IonOptions.disableInlining; + return inlineInterpreted_ && !js_JitOptions.disableInlining; } bool inlineNative() const { - return inlineNative_ && !js_IonOptions.disableInlining; + return inlineNative_ && !js_JitOptions.disableInlining; } uint32_t usesBeforeCompile() const { - if (js_IonOptions.forceDefaultIonUsesBeforeCompile) - return js_IonOptions.forcedDefaultIonUsesBeforeCompile; + if (js_JitOptions.forceDefaultIonUsesBeforeCompile) + return js_JitOptions.forcedDefaultIonUsesBeforeCompile; return usesBeforeCompile_; } bool gvnEnabled() const { - return gvn_ && !js_IonOptions.disableGvn; + return gvn_ && !js_JitOptions.disableGvn; } bool licmEnabled() const { - return licm_ && !js_IonOptions.disableLicm; + return licm_ && !js_JitOptions.disableLicm; } bool uceEnabled() const { - return uce_ && !js_IonOptions.disableUce; + return uce_ && !js_JitOptions.disableUce; } bool rangeAnalysisEnabled() const { - return rangeAnalysis_ && !js_IonOptions.disableRangeAnalysis; + return rangeAnalysis_ && !js_JitOptions.disableRangeAnalysis; } bool eaaEnabled() const { - return eaa_ && !js_IonOptions.disableEaa; + return eaa_ && !js_JitOptions.disableEaa; } bool edgeCaseAnalysisEnabled() const { - return edgeCaseAnalysis_ && !js_IonOptions.disableEdgeCaseAnalysis; + return edgeCaseAnalysis_ && !js_JitOptions.disableEdgeCaseAnalysis; } bool eliminateRedundantChecksEnabled() const { @@ -141,15 +141,15 @@ class OptimizationInfo } IonGvnKind gvnKind() const { - if (!js_IonOptions.forceGvnKind) + if (!js_JitOptions.forceGvnKind) return gvnKind_; - return js_IonOptions.forcedGvnKind; + return js_JitOptions.forcedGvnKind; } IonRegisterAllocator registerAllocator() const { - if (!js_IonOptions.forceRegisterAllocator) + if (!js_JitOptions.forceRegisterAllocator) return registerAllocator_; - return js_IonOptions.forcedRegisterAllocator; + return js_JitOptions.forcedRegisterAllocator; } uint32_t smallFunctionMaxInlineDepth() const { diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp index 3c3bf41d8dfb..a7d6dc1a6e67 100644 --- a/js/src/jit/JitOptions.cpp +++ b/js/src/jit/JitOptions.cpp @@ -4,7 +4,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jit/IonOptions.h" +#include "jit/JitOptions.h" + +#include "jsscript.h" using namespace js; using namespace js::jit; @@ -12,9 +14,9 @@ using namespace js::jit; namespace js { namespace jit { -IonOptions js_IonOptions; +JitOptions js_JitOptions; -IonOptions::IonOptions() +JitOptions::JitOptions() { // Whether to perform expensive graph-consistency DEBUG-only assertions. // It can be useful to disable this to reduce DEBUG-compile time of large @@ -115,13 +117,13 @@ IonOptions::IonOptions() } bool -IonOptions::isSmallFunction(JSScript *script) const +JitOptions::isSmallFunction(JSScript *script) const { return script->length() <= smallFunctionMaxBytecodeLength_; } void -IonOptions::setEagerCompilation() +JitOptions::setEagerCompilation() { eagerCompilation = true; baselineUsesBeforeCompile = 0; @@ -130,27 +132,27 @@ IonOptions::setEagerCompilation() } void -IonOptions::setUsesBeforeCompile(uint32_t useCount) +JitOptions::setUsesBeforeCompile(uint32_t useCount) { forceDefaultIonUsesBeforeCompile = true; forcedDefaultIonUsesBeforeCompile = useCount; // Undo eager compilation if (eagerCompilation && useCount != 0) { - jit::IonOptions defaultValues; + jit::JitOptions defaultValues; eagerCompilation = false; baselineUsesBeforeCompile = defaultValues.baselineUsesBeforeCompile; } } void -IonOptions::resetUsesBeforeCompile() +JitOptions::resetUsesBeforeCompile() { forceDefaultIonUsesBeforeCompile = false; // Undo eager compilation if (eagerCompilation) { - jit::IonOptions defaultValues; + jit::JitOptions defaultValues; eagerCompilation = false; baselineUsesBeforeCompile = defaultValues.baselineUsesBeforeCompile; } diff --git a/js/src/jit/JitOptions.h b/js/src/jit/JitOptions.h index 2f3d3d65cd18..4703e94f5768 100644 --- a/js/src/jit/JitOptions.h +++ b/js/src/jit/JitOptions.h @@ -4,10 +4,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef jit_IonOptions_h -#define jit_IonOptions_h +#ifndef jit_JitOptions_h +#define jit_JitOptions_h #include "jit/IonTypes.h" +#include "js/TypeDecls.h" #ifdef JS_ION @@ -26,7 +27,7 @@ enum IonGvnKind { GVN_Pessimistic }; -struct IonOptions +struct JitOptions { bool checkGraphConsistency; #ifdef CHECK_OSIPOINT_REGISTERS @@ -59,18 +60,18 @@ struct IonOptions uint32_t smallFunctionMaxBytecodeLength_; uint32_t usesBeforeCompilePar; - IonOptions(); + JitOptions(); bool isSmallFunction(JSScript *script) const; void setEagerCompilation(); void setUsesBeforeCompile(uint32_t useCount); void resetUsesBeforeCompile(); }; -extern IonOptions js_IonOptions; +extern JitOptions js_JitOptions; } // namespace jit } // namespace js #endif // JS_ION -#endif /* jit_IonOptions_h */ +#endif /* jit_JitOptions_h */ diff --git a/js/src/jit/LinearScan.cpp b/js/src/jit/LinearScan.cpp index 7a1209113b80..bab16a47e58b 100644 --- a/js/src/jit/LinearScan.cpp +++ b/js/src/jit/LinearScan.cpp @@ -1150,7 +1150,7 @@ LinearScanAllocator::canCoexist(LiveInterval *a, LiveInterval *b) void LinearScanAllocator::validateIntervals() { - if (!js_IonOptions.checkGraphConsistency) + if (!js_JitOptions.checkGraphConsistency) return; for (IntervalIterator i(active.begin()); i != active.end(); i++) { @@ -1196,7 +1196,7 @@ LinearScanAllocator::validateIntervals() void LinearScanAllocator::validateAllocations() { - if (!js_IonOptions.checkGraphConsistency) + if (!js_JitOptions.checkGraphConsistency) return; for (IntervalIterator i(handled.begin()); i != handled.end(); i++) { diff --git a/js/src/jit/LiveRangeAllocator.h b/js/src/jit/LiveRangeAllocator.h index 9387ab7c3d0a..5cefc628547d 100644 --- a/js/src/jit/LiveRangeAllocator.h +++ b/js/src/jit/LiveRangeAllocator.h @@ -600,7 +600,7 @@ class LiveRangeAllocator : protected RegisterAllocator void validateVirtualRegisters() { #ifdef DEBUG - if (!js_IonOptions.checkGraphConsistency) + if (!js_JitOptions.checkGraphConsistency) return; for (size_t i = 1; i < graph.numVirtualRegisters(); i++) { diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index db1b48c5e2e0..66902b447617 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -517,7 +517,7 @@ LIRGenerator::visitAssertFloat32(MAssertFloat32 *assertion) if (!allowFloat32Optimizations()) return true; - if (type != MIRType_Value && !js_IonOptions.eagerCompilation) { + if (type != MIRType_Value && !js_JitOptions.eagerCompilation) { JS_ASSERT_IF(checkIsFloat32, type == MIRType_Float32); JS_ASSERT_IF(!checkIsFloat32, type != MIRType_Float32); } diff --git a/js/src/jit/RangeAnalysis.cpp b/js/src/jit/RangeAnalysis.cpp index b966de4d98f6..5efac4029a7b 100644 --- a/js/src/jit/RangeAnalysis.cpp +++ b/js/src/jit/RangeAnalysis.cpp @@ -2042,7 +2042,7 @@ RangeAnalysis::analyze() bool RangeAnalysis::addRangeAssertions() { - if (!js_IonOptions.checkRangeAnalysis) + if (!js_JitOptions.checkRangeAnalysis) return true; // Check the computed range for this instruction, if the option is set. Note diff --git a/js/src/jit/shared/CodeGenerator-shared.cpp b/js/src/jit/shared/CodeGenerator-shared.cpp index 4d555690197c..0293ac897ca9 100644 --- a/js/src/jit/shared/CodeGenerator-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-shared.cpp @@ -602,7 +602,7 @@ CodeGeneratorShared::verifyOsiPointRegs(LSafepoint *safepoint) bool CodeGeneratorShared::shouldVerifyOsiPointRegs(LSafepoint *safepoint) { - if (!js_IonOptions.checkOsiPointRegisters) + if (!js_JitOptions.checkOsiPointRegisters) return false; if (gen->info().executionMode() != SequentialExecution) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 8f16745f794c..e87304774265 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -5995,19 +5995,19 @@ JS_SetGlobalJitCompilerOption(JSContext *cx, JSJitCompilerOption opt, uint32_t v switch (opt) { case JSJITCOMPILER_BASELINE_USECOUNT_TRIGGER: if (value == uint32_t(-1)) { - jit::IonOptions defaultValues; + jit::JitOptions defaultValues; value = defaultValues.baselineUsesBeforeCompile; } - jit::js_IonOptions.baselineUsesBeforeCompile = value; + jit::js_JitOptions.baselineUsesBeforeCompile = value; break; case JSJITCOMPILER_ION_USECOUNT_TRIGGER: if (value == uint32_t(-1)) { - jit::js_IonOptions.resetUsesBeforeCompile(); + jit::js_JitOptions.resetUsesBeforeCompile(); break; } - jit::js_IonOptions.setUsesBeforeCompile(value); + jit::js_JitOptions.setUsesBeforeCompile(value); if (value == 0) - jit::js_IonOptions.setEagerCompilation(); + jit::js_JitOptions.setEagerCompilation(); break; case JSJITCOMPILER_ION_ENABLE: if (value == 1) { diff --git a/js/src/moz.build b/js/src/moz.build index 4fcece4af6a1..afc2734954cc 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -257,8 +257,8 @@ if CONFIG['ENABLE_ION']: 'jit/IonFrames.cpp', 'jit/IonMacroAssembler.cpp', 'jit/IonOptimizationLevels.cpp', - 'jit/IonOptions.cpp', 'jit/IonSpewer.cpp', + 'jit/JitOptions.cpp', 'jit/JSONSpewer.cpp', 'jit/LICM.cpp', 'jit/LinearScan.cpp', diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 03728e1b0a2a..ed007eba2745 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -5470,13 +5470,13 @@ ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op) if (const char *str = op->getStringOption("ion-gvn")) { if (strcmp(str, "off") == 0) { - jit::js_IonOptions.disableGvn = true; + jit::js_JitOptions.disableGvn = true; } else if (strcmp(str, "pessimistic") == 0) { - jit::js_IonOptions.forceGvnKind = true; - jit::js_IonOptions.forcedGvnKind = jit::GVN_Pessimistic; + jit::js_JitOptions.forceGvnKind = true; + jit::js_JitOptions.forcedGvnKind = jit::GVN_Pessimistic; } else if (strcmp(str, "optimistic") == 0) { - jit::js_IonOptions.forceGvnKind = true; - jit::js_IonOptions.forcedGvnKind = jit::GVN_Optimistic; + jit::js_JitOptions.forceGvnKind = true; + jit::js_JitOptions.forcedGvnKind = jit::GVN_Optimistic; } else { return OptionFailure("ion-gvn", str); } @@ -5484,95 +5484,95 @@ ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op) if (const char *str = op->getStringOption("ion-licm")) { if (strcmp(str, "on") == 0) - jit::js_IonOptions.disableLicm = false; + jit::js_JitOptions.disableLicm = false; else if (strcmp(str, "off") == 0) - jit::js_IonOptions.disableLicm = true; + jit::js_JitOptions.disableLicm = true; else return OptionFailure("ion-licm", str); } if (const char *str = op->getStringOption("ion-edgecase-analysis")) { if (strcmp(str, "on") == 0) - jit::js_IonOptions.disableEdgeCaseAnalysis = false; + jit::js_JitOptions.disableEdgeCaseAnalysis = false; else if (strcmp(str, "off") == 0) - jit::js_IonOptions.disableEdgeCaseAnalysis = true; + jit::js_JitOptions.disableEdgeCaseAnalysis = true; else return OptionFailure("ion-edgecase-analysis", str); } if (const char *str = op->getStringOption("ion-range-analysis")) { if (strcmp(str, "on") == 0) - jit::js_IonOptions.disableRangeAnalysis = false; + jit::js_JitOptions.disableRangeAnalysis = false; else if (strcmp(str, "off") == 0) - jit::js_IonOptions.disableRangeAnalysis = true; + jit::js_JitOptions.disableRangeAnalysis = true; else return OptionFailure("ion-range-analysis", str); } if (op->getBoolOption("ion-check-range-analysis")) - jit::js_IonOptions.checkRangeAnalysis = true; + jit::js_JitOptions.checkRangeAnalysis = true; if (op->getBoolOption("ion-check-thread-safety")) - jit::js_IonOptions.checkThreadSafety = true; + jit::js_JitOptions.checkThreadSafety = true; if (const char *str = op->getStringOption("ion-inlining")) { if (strcmp(str, "on") == 0) - jit::js_IonOptions.disableInlining = false; + jit::js_JitOptions.disableInlining = false; else if (strcmp(str, "off") == 0) - jit::js_IonOptions.disableInlining = true; + jit::js_JitOptions.disableInlining = true; else return OptionFailure("ion-inlining", str); } if (const char *str = op->getStringOption("ion-osr")) { if (strcmp(str, "on") == 0) - jit::js_IonOptions.osr = true; + jit::js_JitOptions.osr = true; else if (strcmp(str, "off") == 0) - jit::js_IonOptions.osr = false; + jit::js_JitOptions.osr = false; else return OptionFailure("ion-osr", str); } if (const char *str = op->getStringOption("ion-limit-script-size")) { if (strcmp(str, "on") == 0) - jit::js_IonOptions.limitScriptSize = true; + jit::js_JitOptions.limitScriptSize = true; else if (strcmp(str, "off") == 0) - jit::js_IonOptions.limitScriptSize = false; + jit::js_JitOptions.limitScriptSize = false; else return OptionFailure("ion-limit-script-size", str); } int32_t useCount = op->getIntOption("ion-uses-before-compile"); if (useCount >= 0) - jit::js_IonOptions.setUsesBeforeCompile(useCount); + jit::js_JitOptions.setUsesBeforeCompile(useCount); useCount = op->getIntOption("baseline-uses-before-compile"); if (useCount >= 0) - jit::js_IonOptions.baselineUsesBeforeCompile = useCount; + jit::js_JitOptions.baselineUsesBeforeCompile = useCount; if (op->getBoolOption("baseline-eager")) - jit::js_IonOptions.baselineUsesBeforeCompile = 0; + jit::js_JitOptions.baselineUsesBeforeCompile = 0; if (const char *str = op->getStringOption("ion-regalloc")) { if (strcmp(str, "lsra") == 0) { - jit::js_IonOptions.forceRegisterAllocator = true; - jit::js_IonOptions.forcedRegisterAllocator = jit::RegisterAllocator_LSRA; + jit::js_JitOptions.forceRegisterAllocator = true; + jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_LSRA; } else if (strcmp(str, "backtracking") == 0) { - jit::js_IonOptions.forceRegisterAllocator = true; - jit::js_IonOptions.forcedRegisterAllocator = jit::RegisterAllocator_Backtracking; + jit::js_JitOptions.forceRegisterAllocator = true; + jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Backtracking; } else if (strcmp(str, "stupid") == 0) { - jit::js_IonOptions.forceRegisterAllocator = true; - jit::js_IonOptions.forcedRegisterAllocator = jit::RegisterAllocator_Stupid; + jit::js_JitOptions.forceRegisterAllocator = true; + jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Stupid; } else { return OptionFailure("ion-regalloc", str); } } if (op->getBoolOption("ion-eager")) - jit::js_IonOptions.setEagerCompilation(); + jit::js_JitOptions.setEagerCompilation(); if (op->getBoolOption("ion-compile-try-catch")) - jit::js_IonOptions.compileTryCatch = true; + jit::js_JitOptions.compileTryCatch = true; bool parallelCompilation = true; if (const char *str = op->getStringOption("ion-parallel-compile")) { diff --git a/js/src/vm/ForkJoin.cpp b/js/src/vm/ForkJoin.cpp index 007d729c9218..feb8e972a075 100644 --- a/js/src/vm/ForkJoin.cpp +++ b/js/src/vm/ForkJoin.cpp @@ -2218,8 +2218,8 @@ js::ParallelTestsShouldPass(JSContext *cx) { return jit::IsIonEnabled(cx) && jit::IsBaselineEnabled(cx) && - !jit::js_IonOptions.eagerCompilation && - jit::js_IonOptions.baselineUsesBeforeCompile != 0 && + !jit::js_JitOptions.eagerCompilation && + jit::js_JitOptions.baselineUsesBeforeCompile != 0 && cx->runtime()->gcZeal() == 0; }