mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 923659 - IonMonkey: Use null instead of allocating a Range when nothing is known. r=nbp
This commit is contained in:
parent
eab8d5e710
commit
e0cba790bf
@ -760,7 +760,7 @@ Range::min(const Range *lhs, const Range *rhs)
|
|||||||
{
|
{
|
||||||
// If either operand is NaN, the result is NaN.
|
// If either operand is NaN, the result is NaN.
|
||||||
if (lhs->canBeNaN() || rhs->canBeNaN())
|
if (lhs->canBeNaN() || rhs->canBeNaN())
|
||||||
return new Range();
|
return nullptr;
|
||||||
|
|
||||||
return new Range(Min(lhs->lower_, rhs->lower_),
|
return new Range(Min(lhs->lower_, rhs->lower_),
|
||||||
lhs->hasInt32LowerBound_ && rhs->hasInt32LowerBound_,
|
lhs->hasInt32LowerBound_ && rhs->hasInt32LowerBound_,
|
||||||
@ -775,7 +775,7 @@ Range::max(const Range *lhs, const Range *rhs)
|
|||||||
{
|
{
|
||||||
// If either operand is NaN, the result is NaN.
|
// If either operand is NaN, the result is NaN.
|
||||||
if (lhs->canBeNaN() || rhs->canBeNaN())
|
if (lhs->canBeNaN() || rhs->canBeNaN())
|
||||||
return new Range();
|
return nullptr;
|
||||||
|
|
||||||
return new Range(Max(lhs->lower_, rhs->lower_),
|
return new Range(Max(lhs->lower_, rhs->lower_),
|
||||||
lhs->hasInt32LowerBound_ || rhs->hasInt32LowerBound_,
|
lhs->hasInt32LowerBound_ || rhs->hasInt32LowerBound_,
|
||||||
|
Loading…
Reference in New Issue
Block a user