[INFER] Remove bogus assert, bug 642758.
authorBrian Hackett <bhackett1024@gmail.com>
Sat, 19 Mar 2011 09:25:15 -0700
changeset 74813 332d7b94dc35f7a5bfd4b0583c27a3a8942e1ed6
parent 74812 7154281e487bdec4825299b2ebee511c9aac51df
child 74814 b6cae337d38dbc449bea261a0c43f917c9faffb8
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
bugs642758
milestone2.0b13pre
[INFER] Remove bogus assert, bug 642758.
js/src/jit-test/tests/basic/bug642758.js
js/src/methodjit/FastArithmetic.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug642758.js
@@ -0,0 +1,4 @@
+function Integer( value, exception ) { }
+try {
+new Integer( Math.LN2, ++INVALID_INTEGER_VALUE? exception+1.1: 1900 );
+} catch (e) {}
--- a/js/src/methodjit/FastArithmetic.cpp
+++ b/js/src/methodjit/FastArithmetic.cpp
@@ -373,17 +373,16 @@ mjit::Compiler::jsop_binary_double(Frame
     }
 
     if (type == JSVAL_TYPE_INT32) {
         /*
          * Integer conversion failed, but the result is expected to be an integer.
          * Call a stub and try harder to convert to int32, or failing that trigger
          * recompilation of this script.
          */
-        JS_ASSERT(op == JSOP_DIV);
         stubcc.linkExit(masm.jump(), Uses(2));
     } else if (type != JSVAL_TYPE_DOUBLE) {
         masm.storeDouble(fpLeft, frame.addressOf(lhs));
     }
 
     if (done.isSet())
         done.getJump().linkTo(masm.label(), &masm);