Bug 1176289 - Record proper optimization tracking outcome on failure of getPropTryConstant due to non-singleton value. r=shu
authorKannan Vijayan <kvijayan@mozilla.com>
Mon, 06 Jul 2015 11:55:23 -0400
changeset 275879 bb924c51e2849c40fbfae45a5727b8dcd2b855dc
parent 275878 f4ac17101a35f57d40febb4575360f42a954e7f4
child 275880 2a2556b4ed28af6da6180b33cbe2df438ad7f0cd
push id3246
push usergijskruitbosch@gmail.com
push dateTue, 07 Jul 2015 09:06:38 +0000
reviewersshu
bugs1176289
milestone42.0a1
Bug 1176289 - Record proper optimization tracking outcome on failure of getPropTryConstant due to non-singleton value. r=shu
js/src/jit/IonBuilder.cpp
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -10306,18 +10306,20 @@ IonBuilder::getPropTryConstant(bool* emi
     if (!types->mightBeMIRType(MIRType_Object)) {
         // If we have not observed an object result here, don't look for a
         // singleton constant.
         trackOptimizationOutcome(TrackedOutcome::NotObject);
         return true;
     }
 
     JSObject* singleton = testSingletonPropertyTypes(obj, name);
-    if (!singleton)
-        return true;
+    if (!singleton) {
+        trackOptimizationOutcome(TrackedOutcome::NotSingleton);
+        return true;
+    }
 
     // Property access is a known constant -- safe to emit.
     obj->setImplicitlyUsedUnchecked();
 
     pushConstant(ObjectValue(*singleton));
 
     trackOptimizationSuccess();
     *emitted = true;