Bug 1228340: Remove the js_ prefix in front of IonOptimizationsLevel; r=h4writer
authorBenjamin Bouvier <benj@benj.me>
Thu, 26 Nov 2015 14:53:26 +0100
changeset 309074 dd50837b1f0cbdc37dd88112584a22467742a9d6
parent 309073 f29788babeaceac907bff4782e24c4560431dee5
child 309075 91bfd1093c2c748012d4aeb4af3a08f91daf04ce
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1228340
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1228340: Remove the js_ prefix in front of IonOptimizationsLevel; r=h4writer
js/src/asmjs/WasmIonCompile.cpp
js/src/jit/BaselineCompiler.cpp
js/src/jit/Ion.cpp
js/src/jit/IonAnalysis.cpp
js/src/jit/IonBuilder.cpp
js/src/jit/IonOptimizationLevels.cpp
js/src/jit/IonOptimizationLevels.h
--- a/js/src/asmjs/WasmIonCompile.cpp
+++ b/js/src/asmjs/WasmIonCompile.cpp
@@ -2931,17 +2931,17 @@ wasm::CompileFunction(CompileTask* task)
     FunctionCompileResults& results = task->results();
 
     JitContext jitContext(CompileRuntime::get(args.runtime), &results.alloc());
 
     const JitCompileOptions options;
     MIRGraph graph(&results.alloc());
     CompileInfo compileInfo(func.numLocals());
     MIRGenerator mir(nullptr, options, &results.alloc(), &graph, &compileInfo,
-                     js_IonOptimizations.get(Optimization_AsmJS),
+                     IonOptimizations.get(Optimization_AsmJS),
                      args.usesSignalHandlersForOOB);
 
     // Build MIR graph
     {
         FunctionCompiler f(args, func, mir, results);
         if (!f.init())
             return false;
 
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -736,17 +736,17 @@ BaselineCompiler::emitWarmUpCounterIncre
     // OSR not possible at this loop entry.
     if (!allowOsr) {
         MOZ_ASSERT(JSOp(*pc) == JSOP_LOOPENTRY);
         return true;
     }
 
     Label skipCall;
 
-    const OptimizationInfo* info = js_IonOptimizations.get(js_IonOptimizations.firstLevel());
+    const OptimizationInfo* info = IonOptimizations.get(IonOptimizations.firstLevel());
     uint32_t warmUpThreshold = info->compilerWarmUpThreshold(script, pc);
     masm.branch32(Assembler::LessThan, countReg, Imm32(warmUpThreshold), &skipCall);
 
     masm.branchPtr(Assembler::Equal,
                    Address(scriptReg, JSScript::offsetOfIonScript()),
                    ImmPtr(ION_COMPILING_SCRIPT), &skipCall);
 
     // Call IC.
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -2158,17 +2158,17 @@ IonCompile(JSContext* cx, JSScript* scri
         if (!baselineFrameInspector)
             return AbortReason_Alloc;
     }
 
     CompilerConstraintList* constraints = NewCompilerConstraintList(*temp);
     if (!constraints)
         return AbortReason_Alloc;
 
-    const OptimizationInfo* optimizationInfo = js_IonOptimizations.get(optimizationLevel);
+    const OptimizationInfo* optimizationInfo = IonOptimizations.get(optimizationLevel);
     const JitCompileOptions options(cx);
 
     IonBuilder* builder = alloc->new_<IonBuilder>((JSContext*) nullptr,
                                                   CompileCompartment::get(cx->compartment()),
                                                   options, temp, graph, constraints,
                                                   inspector, info, optimizationInfo,
                                                   baselineFrameInspector);
     if (!builder)
@@ -2359,17 +2359,17 @@ CanIonCompileScript(JSContext* cx, JSScr
         return false;
 
     return CheckScriptSize(cx, script) == Method_Compiled;
 }
 
 static OptimizationLevel
 GetOptimizationLevel(HandleScript script, jsbytecode* pc)
 {
-    return js_IonOptimizations.levelForScript(script, pc);
+    return IonOptimizations.levelForScript(script, pc);
 }
 
 static MethodStatus
 Compile(JSContext* cx, HandleScript script, BaselineFrame* osrFrame, jsbytecode* osrPc,
         bool constructing, bool forceRecompile = false)
 {
     MOZ_ASSERT(jit::IsIonEnabled(cx));
     MOZ_ASSERT(jit::IsBaselineEnabled(cx));
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -3678,17 +3678,17 @@ jit::AnalyzeNewScriptDefiniteProperties(
         return false;
 
     CompileInfo info(script, fun,
                      /* osrPc = */ nullptr, /* constructing = */ false,
                      Analysis_DefiniteProperties,
                      script->needsArgsObj(),
                      inlineScriptTree);
 
-    const OptimizationInfo* optimizationInfo = js_IonOptimizations.get(Optimization_Normal);
+    const OptimizationInfo* optimizationInfo = IonOptimizations.get(Optimization_Normal);
 
     CompilerConstraintList* constraints = NewCompilerConstraintList(temp);
     if (!constraints) {
         ReportOutOfMemory(cx);
         return false;
     }
 
     BaselineInspector inspector(script);
@@ -3899,17 +3899,17 @@ jit::AnalyzeArgumentsUsage(JSContext* cx
     }
 
     CompileInfo info(script, script->functionNonDelazifying(),
                      /* osrPc = */ nullptr, /* constructing = */ false,
                      Analysis_ArgumentsUsage,
                      /* needsArgsObj = */ true,
                      inlineScriptTree);
 
-    const OptimizationInfo* optimizationInfo = js_IonOptimizations.get(Optimization_Normal);
+    const OptimizationInfo* optimizationInfo = IonOptimizations.get(Optimization_Normal);
 
     CompilerConstraintList* constraints = NewCompilerConstraintList(temp);
     if (!constraints) {
         ReportOutOfMemory(cx);
         return false;
     }
 
     BaselineInspector inspector(script);
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -7731,29 +7731,29 @@ ObjectHasExtraOwnProperty(CompileCompart
     return ClassMayResolveId(comp->runtime()->names(), clasp, id, singleton);
 }
 
 void
 IonBuilder::insertRecompileCheck()
 {
     // No need for recompile checks if this is the highest optimization level.
     OptimizationLevel curLevel = optimizationInfo().level();
-    if (js_IonOptimizations.isLastLevel(curLevel))
+    if (IonOptimizations.isLastLevel(curLevel))
         return;
 
     // Add recompile check.
 
     // Get the topmost builder. The topmost script will get recompiled when
     // warm-up counter is high enough to justify a higher optimization level.
     IonBuilder* topBuilder = outermostBuilder();
 
     // Add recompile check to recompile when the warm-up count reaches the
     // threshold of the next optimization level.
-    OptimizationLevel nextLevel = js_IonOptimizations.nextLevel(curLevel);
-    const OptimizationInfo* info = js_IonOptimizations.get(nextLevel);
+    OptimizationLevel nextLevel = IonOptimizations.nextLevel(curLevel);
+    const OptimizationInfo* info = IonOptimizations.get(nextLevel);
     uint32_t warmUpThreshold = info->compilerWarmUpThreshold(topBuilder->script());
     MRecompileCheck* check = MRecompileCheck::New(alloc(), topBuilder->script(), warmUpThreshold,
                                 MRecompileCheck::RecompileCheck_OptimizationLevel);
     current->add(check);
 }
 
 JSObject*
 IonBuilder::testSingletonProperty(JSObject* obj, jsid id)
--- a/js/src/jit/IonOptimizationLevels.cpp
+++ b/js/src/jit/IonOptimizationLevels.cpp
@@ -11,17 +11,17 @@
 #include "jit/Ion.h"
 
 using namespace js;
 using namespace js::jit;
 
 namespace js {
 namespace jit {
 
-OptimizationInfos js_IonOptimizations;
+OptimizationInfos IonOptimizations;
 
 void
 OptimizationInfo::initNormalOptimizationInfo()
 {
     level_ = Optimization_Normal;
 
     eaa_ = true;
     edgeCaseAnalysis_ = true;
--- a/js/src/jit/IonOptimizationLevels.h
+++ b/js/src/jit/IonOptimizationLevels.h
@@ -279,14 +279,14 @@ class OptimizationInfos
     }
 
     OptimizationLevel nextLevel(OptimizationLevel level) const;
     OptimizationLevel firstLevel() const;
     bool isLastLevel(OptimizationLevel level) const;
     OptimizationLevel levelForScript(JSScript* script, jsbytecode* pc = nullptr) const;
 };
 
-extern OptimizationInfos js_IonOptimizations;
+extern OptimizationInfos IonOptimizations;
 
 } // namespace jit
 } // namespace js
 
 #endif /* jit_IonOptimizationLevels_h */