Bug 1355058 part 2 - Avoid creating unnecessary type constraints in IonBuilder::typedObjectPrediction. r=h4writer
authorJan de Mooij <jdemooij@mozilla.com>
Sat, 15 Apr 2017 10:25:47 +0200
changeset 563288 ad497a610771d177c0810e3a58c199205b6daeef
parent 563287 fd4b315d43b9de9f9b4faa75867862978fd93ac9
child 563289 4a4cf63c95a1ad94a7bb46f41da111265c5a0365
push id54258
push usercpeterson@mozilla.com
push dateSun, 16 Apr 2017 05:52:14 +0000
reviewersh4writer
bugs1355058
milestone55.0a1
Bug 1355058 part 2 - Avoid creating unnecessary type constraints in IonBuilder::typedObjectPrediction. r=h4writer
js/src/jit/IonBuilder.cpp
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -13073,20 +13073,20 @@ IonBuilder::typedObjectPrediction(Tempor
 
     // And only known objects.
     if (types->unknownObject())
         return TypedObjectPrediction();
 
     TypedObjectPrediction out;
     for (uint32_t i = 0; i < types->getObjectCount(); i++) {
         ObjectGroup* group = types->getGroup(i);
-        if (!group || !TypeSet::ObjectKey::get(group)->hasStableClassAndProto(constraints()))
+        if (!group || !IsTypedObjectClass(group->clasp()))
             return TypedObjectPrediction();
 
-        if (!IsTypedObjectClass(group->clasp()))
+        if (!TypeSet::ObjectKey::get(group)->hasStableClassAndProto(constraints()))
             return TypedObjectPrediction();
 
         out.addDescr(group->typeDescr());
     }
 
     return out;
 }