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:
Dan Gohman 2013-08-19 17:04:09 -07:00
parent 3dd1920bf3
commit ef2acc12ac
2 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,5 @@
ParallelArray([57], function() {
return (Math.max(2207764374, (function() {
return 1
})()))
})

View File

@ -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.