зеркало из https://github.com/mozilla/gecko-dev.git
Bug 995675 - IonMonkey: Remove incorrect optimization of ToDouble, r=jandem
This commit is contained in:
Родитель
2243268a97
Коммит
fb71493b70
|
@ -0,0 +1,5 @@
|
|||
function f(x) {
|
||||
return Math.cos(~(~Math.pow(Number.MAX_VALUE, x)))
|
||||
}
|
||||
f(-0)
|
||||
assertEq(f(undefined - undefined), 1)
|
|
@ -586,13 +586,6 @@ IonBuilder::inlineMathAbs(CallInfo &callInfo)
|
|||
MInstruction *ins = MAbs::New(alloc(), callInfo.getArg(0), absType);
|
||||
current->add(ins);
|
||||
|
||||
if (IsFloatingPointType(argType) && returnType == MIRType_Int32) {
|
||||
MToInt32 *toInt = MToInt32::New(alloc(), ins);
|
||||
toInt->setCanBeNegativeZero(false);
|
||||
current->add(toInt);
|
||||
ins = toInt;
|
||||
}
|
||||
|
||||
current->push(ins);
|
||||
return InliningStatus_Inlined;
|
||||
}
|
||||
|
|
|
@ -2328,12 +2328,6 @@ MToDouble::foldsTo(TempAllocator &alloc, bool useValueNumbers)
|
|||
}
|
||||
}
|
||||
|
||||
// Fold unnecessary numeric conversions.
|
||||
if (input()->isToInt32()) {
|
||||
replaceOperand(0, input()->getOperand(0));
|
||||
conversion_ = NonStringPrimitives;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче