Require a register for LDoubleToInt32 (bug 725062, r=sstangl).
authorDavid Anderson <danderson@mozilla.com>
Wed, 08 Feb 2012 14:35:38 -0800
changeset 112669 e8055203d13e320514a19df7e72b7959209a306d
parent 112668 2e4b0fad5914eaea706df9a1f0976cbb5ce1f662
child 112670 63d066d8186beffe54bbb76d6f7e093854795733
push id239
push userakeybl@mozilla.com
push dateThu, 03 Jan 2013 21:54:43 +0000
treeherdermozilla-release@3a7b66445659 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs725062
milestone13.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
Require a register for LDoubleToInt32 (bug 725062, r=sstangl).
js/src/ion/Lowering.cpp
js/src/jit-test/tests/ion/bug725062.js
--- a/js/src/ion/Lowering.cpp
+++ b/js/src/ion/Lowering.cpp
@@ -665,17 +665,17 @@ LIRGenerator::visitToInt32(MToInt32 *con
         return define(new LInteger(0), convert);
 
       case MIRType_Int32:
       case MIRType_Boolean:
         return redefine(convert, opd);
 
       case MIRType_Double:
       {
-        LDoubleToInt32 *lir = new LDoubleToInt32(use(opd));
+        LDoubleToInt32 *lir = new LDoubleToInt32(useRegister(opd));
         return assignSnapshot(lir) && define(lir, convert);
       }
 
       default:
         // Undefined coerces to NaN, not int32.
         // Objects might be effectful.
         // Strings are complicated - we don't handle them yet.
         JS_NOT_REACHED("unexpected type");
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug725062.js
@@ -0,0 +1,7 @@
+// |jit-test| error: InternalError
+function rec(x, self) {
+    if (a = parseLegacyJSON("[1 , ]").length)
+        self(x - 001 , self);
+    self(NaN, self);
+}
+rec(1, rec);