mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00: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
3b6b988ef6
commit
59a0085085
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