Loading js/src/jit-test/tests/warp/bug1686702.js 0 → 100644 +3 −0 Original line number Original line Diff line number Diff line for (var j = 0; j < 100; j++) { +(Math.fround(1) && 0); } js/src/jit/MIR.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1703,6 +1703,13 @@ MDefinition* MUnbox::foldsTo(TempAllocator& alloc) { return MToDouble::New(alloc, unboxed); return MToDouble::New(alloc, unboxed); } } // MUnbox<Int32>(MBox<Double>(x)) will always fail, even if x can be // represented as an Int32. Fold to avoid unnecessary bailouts. if (type() == MIRType::Int32 && unboxed->type() == MIRType::Double) { return MToNumberInt32::New(alloc, unboxed, IntConversionInputKind::NumbersOnly); } } } return this; return this; Loading Loading
js/src/jit-test/tests/warp/bug1686702.js 0 → 100644 +3 −0 Original line number Original line Diff line number Diff line for (var j = 0; j < 100; j++) { +(Math.fround(1) && 0); }
js/src/jit/MIR.cpp +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1703,6 +1703,13 @@ MDefinition* MUnbox::foldsTo(TempAllocator& alloc) { return MToDouble::New(alloc, unboxed); return MToDouble::New(alloc, unboxed); } } // MUnbox<Int32>(MBox<Double>(x)) will always fail, even if x can be // represented as an Int32. Fold to avoid unnecessary bailouts. if (type() == MIRType::Int32 && unboxed->type() == MIRType::Double) { return MToNumberInt32::New(alloc, unboxed, IntConversionInputKind::NumbersOnly); } } } return this; return this; Loading