Bug 1273867 - Don't call checkIsDefinitelyOptimizedArguments for getprops other than .length or .callee. r=h4writer
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 01 Jun 2016 15:12:03 +0200
changeset 338946 fa0c71f97aff115779e4a4ef0286c23578ec73f1
parent 338945 fced3739df6b02a0217fa11ca18e1563e39816d3
child 338947 eb3d041b34c2a73f833ff1ee8af27832961e3bf8
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1273867
milestone49.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 1273867 - Don't call checkIsDefinitelyOptimizedArguments for getprops other than .length or .callee. r=h4writer
js/src/jit/IonBuilder.cpp
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -11565,25 +11565,25 @@ IonBuilder::getPropTryInferredConstant(b
     return true;
 }
 
 bool
 IonBuilder::getPropTryArgumentsLength(bool* emitted, MDefinition* obj)
 {
     MOZ_ASSERT(*emitted == false);
 
+    if (JSOp(*pc) != JSOP_LENGTH)
+        return true;
+
     bool isOptimizedArgs = false;
     if (!checkIsDefinitelyOptimizedArguments(obj, &isOptimizedArgs))
         return false;
     if (!isOptimizedArgs)
         return true;
 
-    if (JSOp(*pc) != JSOP_LENGTH)
-        return true;
-
     trackOptimizationSuccess();
     *emitted = true;
 
     obj->setImplicitlyUsedUnchecked();
 
     // We don't know anything from the callee
     if (inliningDepth_ == 0) {
         MInstruction* ins = MArgumentsLength::New(alloc());
@@ -11597,25 +11597,25 @@ IonBuilder::getPropTryArgumentsLength(bo
     return true;
 }
 
 bool
 IonBuilder::getPropTryArgumentsCallee(bool* emitted, MDefinition* obj, PropertyName* name)
 {
     MOZ_ASSERT(*emitted == false);
 
+    if (name != names().callee)
+        return true;
+
     bool isOptimizedArgs = false;
     if (!checkIsDefinitelyOptimizedArguments(obj, &isOptimizedArgs))
         return false;
     if (!isOptimizedArgs)
         return true;
 
-    if (name != names().callee)
-        return true;
-
     MOZ_ASSERT(script()->hasMappedArgsObj());
 
     obj->setImplicitlyUsedUnchecked();
     current->push(getCallee());
 
     trackOptimizationSuccess();
     *emitted = true;
     return true;