mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 930477: Follow-up - Don't allow the power type to be Float32 for MPow; r=h4writer
--HG-- extra : rebase_source : 361b5edcdf6e464168ff2bcd82aee00843410dd2
This commit is contained in:
parent
ad06a97eec
commit
7c77f4ceb2
6
js/src/jit-test/tests/ion/bug975290.js
Normal file
6
js/src/jit-test/tests/ion/bug975290.js
Normal file
@ -0,0 +1,6 @@
|
||||
for (var j = 0; j < 9999; ++j) {
|
||||
(function() {
|
||||
Math.pow(Math.fround(), Math.fround(0))
|
||||
})();
|
||||
}
|
||||
|
@ -842,6 +842,8 @@ IonBuilder::inlineMathPow(CallInfo &callInfo)
|
||||
|
||||
// Use MPow for other powers
|
||||
if (!output) {
|
||||
if (powerType == MIRType_Float32)
|
||||
powerType = MIRType_Double;
|
||||
MPow *pow = MPow::New(alloc(), base, power, powerType);
|
||||
current->add(pow);
|
||||
output = pow;
|
||||
|
@ -3752,6 +3752,7 @@ class MPow
|
||||
static MPow *New(TempAllocator &alloc, MDefinition *input, MDefinition *power,
|
||||
MIRType powerType)
|
||||
{
|
||||
JS_ASSERT(powerType == MIRType_Double || powerType == MIRType_Int32);
|
||||
return new(alloc) MPow(input, power, powerType);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user