Fix bogus assert, bug 688968. r=dvander
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 03 Oct 2011 14:51:40 -0700
changeset 78034 db349edef0d6
parent 78033 347b57a14ce3
child 78035 e6c9998fbf74
push id21260
push usermbrubeck@mozilla.com
push date2011-10-03 23:22 +0000
treeherdermozilla-central@25b8388347af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs688968
milestone10.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
Fix bogus assert, bug 688968. r=dvander
js/src/methodjit/FastOps.cpp
--- a/js/src/methodjit/FastOps.cpp
+++ b/js/src/methodjit/FastOps.cpp
@@ -2211,18 +2211,20 @@ mjit::Compiler::jsop_stricteq(JSOp op)
         StrictlyEqual(cx, lhs->getValue(), rhs->getValue(), &b);
         frame.popn(2);
         frame.push(BooleanValue((op == JSOP_STRICTEQ) ? b : !b));
         return;
     }
 
     if (frame.haveSameBacking(lhs, rhs)) {
         /* False iff NaN. */
+        frame.pop();
+
         if (lhs->isTypeKnown() && lhs->isNotType(JSVAL_TYPE_DOUBLE)) {
-            frame.popn(2);
+            frame.pop();
             frame.push(BooleanValue(op == JSOP_STRICTEQ));
             return;
         }
 
         if (lhs->isType(JSVAL_TYPE_DOUBLE))
             frame.forgetKnownDouble(lhs);
 
         /* Assume NaN is either in canonical form or has the sign bit set (by jsop_neg). */
@@ -2251,17 +2253,17 @@ mjit::Compiler::jsop_stricteq(JSOp op)
         masm.setPtr(oppositeCond, treg, Imm32(ShiftedCanonicalNaNType), result);
 #else
         static const void *ShiftedCanonicalNaNType = (void *)(0x7FF8000000000000 << 1);
         masm.move(ImmPtr(ShiftedCanonicalNaNType), Registers::ScratchReg);
         masm.setPtr(oppositeCond, treg, Registers::ScratchReg, result);
 #endif
         frame.freeReg(treg);
 
-        frame.popn(2);
+        frame.pop();
         frame.pushTypedPayload(JSVAL_TYPE_BOOLEAN, result);
         return;
     }
 
     /* Comparison against undefined or null is super easy. */
     bool lhsTest;
     if ((lhsTest = ReallySimpleStrictTest(lhs)) || ReallySimpleStrictTest(rhs)) {
         FrameEntry *test = lhsTest ? rhs : lhs;