Bug 1200809 part 8 - Don't call shouldAbortOnPreliminaryGroups if we have an uninlinable native. r=bhackett
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 11 Sep 2015 18:53:19 -0700
changeset 294688 5962e3f3deb84d0e1189847e619034a6b8220c2d
parent 294687 779d6485703dbb8f1cf83eadc1b80b9f647b73da
child 294689 10892d37b75518bba9953e5b4801ec1f069d2155
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1200809
milestone43.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 1200809 part 8 - Don't call shouldAbortOnPreliminaryGroups if we have an uninlinable native. r=bhackett
js/src/jit/MCallOptimize.cpp
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -40,33 +40,33 @@ IonBuilder::inlineNativeCall(CallInfo& c
 {
     MOZ_ASSERT(target->isNative());
 
     if (!optimizationInfo().inlineNative()) {
         trackOptimizationOutcome(TrackedOutcome::CantInlineDisabledIon);
         return InliningStatus_NotInlined;
     }
 
+    if (!target->jitInfo() || target->jitInfo()->type() != JSJitInfo::InlinableNative) {
+        // Reaching here means we tried to inline a native for which there is no
+        // Ion specialization.
+        trackOptimizationOutcome(TrackedOutcome::CantInlineNativeNoSpecialization);
+        return InliningStatus_NotInlined;
+    }
+
     // Default failure reason is observing an unsupported type.
     trackOptimizationOutcome(TrackedOutcome::CantInlineNativeBadType);
 
     if (shouldAbortOnPreliminaryGroups(callInfo.thisArg()))
         return InliningStatus_NotInlined;
     for (size_t i = 0; i < callInfo.argc(); i++) {
         if (shouldAbortOnPreliminaryGroups(callInfo.getArg(i)))
             return InliningStatus_NotInlined;
     }
 
-    if (!target->jitInfo() || target->jitInfo()->type() != JSJitInfo::InlinableNative) {
-        // Reaching here means we tried to inline a native for which there is no
-        // Ion specialization.
-        trackOptimizationOutcome(TrackedOutcome::CantInlineNativeNoSpecialization);
-        return InliningStatus_NotInlined;
-    }
-
     switch (InlinableNative inlNative = target->jitInfo()->inlinableNative) {
       // Array natives.
       case InlinableNative::Array:
         return inlineArray(callInfo);
       case InlinableNative::ArrayIsArray:
         return inlineArrayIsArray(callInfo);
       case InlinableNative::ArrayPop:
         return inlineArrayPopShift(callInfo, MArrayPopShift::Pop);