mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
Bug 1329933 - IonMonkey: add 0 to the range if NaN is in the input range, r=nbp
This commit is contained in:
parent
cf13e95ac8
commit
d3a9026c55
@ -1218,8 +1218,14 @@ Range*
|
||||
Range::NaNToZero(TempAllocator& alloc, const Range *op)
|
||||
{
|
||||
Range* copy = new(alloc) Range(*op);
|
||||
if (copy->canBeNaN())
|
||||
if (copy->canBeNaN()) {
|
||||
copy->max_exponent_ = Range::IncludesInfinity;
|
||||
if (!copy->canBeZero()) {
|
||||
Range zero;
|
||||
zero.setDoubleSingleton(0);
|
||||
copy->unionWith(&zero);
|
||||
}
|
||||
}
|
||||
copy->refineToExcludeNegativeZero();
|
||||
return copy;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user