Bug 1151401 - Watch for non-object unboxes while optimizing object-or-null operations, r=jandem.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 09 Apr 2015 10:51:59 -0600
changeset 257319 30f3ac8076dd6ad5b2e414b4330ade43d3a4adae
parent 257318 b8c0cfa633b413e9ac92f0f4b53395b20a285117
child 257320 2982f84319a6f2b9e5d7468a589c3f75902c8b38
push id8007
push userraliiev@mozilla.com
push dateMon, 11 May 2015 19:23:16 +0000
treeherdermozilla-aurora@e2ce1aac996e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1151401
milestone40.0a1
Bug 1151401 - Watch for non-object unboxes while optimizing object-or-null operations, r=jandem.
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2556,17 +2556,18 @@ TryOptimizeLoadObjectOrNull(MDefinition*
             break;
           case MDefinition::Op_StoreSlot:
             break;
           case MDefinition::Op_ToObjectOrNull:
             if (!eliminateList.append(ndef->toToObjectOrNull()))
                 return false;
             break;
           case MDefinition::Op_Unbox:
-            MOZ_ASSERT(ndef->type() == MIRType_Object);
+            if (ndef->type() != MIRType_Object)
+                return true;
             break;
           case MDefinition::Op_TypeBarrier:
             // For now, only handle type barriers which are not consumed
             // anywhere and only test that the value is null.
             if (ndef->hasUses() || ndef->resultTypeSet()->getKnownMIRType() != MIRType_Null)
                 return true;
             break;
           default: