mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
changeset: 143171:50fded5df4fd
tag: tip user: Dan Gohman <sunfish@google.com> summary: Bug 906885 - IonMonkey: Don't use range::isInfinite to test whether the value can be outside the bounds implied by lower() and upper(). r=nbp
This commit is contained in:
parent
3dd1920bf3
commit
ef2acc12ac
5
js/src/jit-test/tests/ion/bug906885.js
Normal file
5
js/src/jit-test/tests/ion/bug906885.js
Normal file
@ -0,0 +1,5 @@
|
||||
ParallelArray([57], function() {
|
||||
return (Math.max(2207764374, (function() {
|
||||
return 1
|
||||
})()))
|
||||
})
|
@ -695,8 +695,8 @@ Range::abs(const Range *op)
|
||||
Range *
|
||||
Range::min(const Range *lhs, const Range *rhs)
|
||||
{
|
||||
// If either operand is NaN (implied by isInfinite here), the result is NaN.
|
||||
if (lhs->isInfinite() || rhs->isInfinite())
|
||||
// If either operand is NaN, the result is NaN.
|
||||
if (!lhs->isInt32() || !rhs->isInt32())
|
||||
return new Range();
|
||||
|
||||
return new Range(Min(lhs->lower(), rhs->lower()),
|
||||
@ -708,8 +708,8 @@ Range::min(const Range *lhs, const Range *rhs)
|
||||
Range *
|
||||
Range::max(const Range *lhs, const Range *rhs)
|
||||
{
|
||||
// If either operand is NaN (implied by isInfinite here), the result is NaN.
|
||||
if (lhs->isInfinite() || rhs->isInfinite())
|
||||
// If either operand is NaN, the result is NaN.
|
||||
if (!lhs->isInt32() || !rhs->isInt32())
|
||||
return new Range();
|
||||
|
||||
return new Range(Max(lhs->lower(), rhs->lower()),
|
||||
@ -1061,7 +1061,7 @@ MMod::computeRange()
|
||||
|
||||
// If either operand is a NaN, the result is NaN. This also conservatively
|
||||
// handles Infinity cases.
|
||||
if (lhs.isInfinite() || rhs.isInfinite())
|
||||
if (!lhs.isInt32() || !rhs.isInt32())
|
||||
return;
|
||||
|
||||
// If RHS can be zero, the result can be NaN.
|
||||
|
Loading…
Reference in New Issue
Block a user