Bug 1151401 - Watch for non-object unboxes while optimizing object-or-null operations. r=jandem, a=sledru
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 09 Apr 2015 10:51:59 -0600
changeset 258422 d2bade84e15e
parent 258421 e2f81a3ca1e5
child 258423 948241aa9d1a
push id4665
push userryanvm@gmail.com
push date2015-04-10 17:13 +0000
treeherdermozilla-beta@6d9fdd280e65 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, sledru
bugs1151401
milestone38.0
Bug 1151401 - Watch for non-object unboxes while optimizing object-or-null operations. r=jandem, a=sledru
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2548,17 +2548,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: