File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ namespace Js
283
283
// For AMD64/ARM calling convention already uses SSE2/VFP registers so we don't have to use assembler.
284
284
// We can't just use "if (0 == y)" because NaN compares
285
285
// equal to 0 according to our compilers.
286
+ int32 intY;
286
287
if (0 == NumberUtilities::LuLoDbl (y) && 0 == (NumberUtilities::LuHiDbl (y) & 0x7FFFFFFF ))
287
288
{
288
289
// pow(x, 0) = 1 even if x is NaN.
@@ -293,6 +294,11 @@ namespace Js
293
294
// pow([+/-] 1, Infinity) = NaN according to javascript, but not for CRT pow.
294
295
return JavascriptNumber::NaN;
295
296
}
297
+ else if (TryGetInt32Value (y, &intY))
298
+ {
299
+ // check fast path
300
+ return DirectPowDoubleInt (x, intY);
301
+ }
296
302
297
303
return ::pow (x, y);
298
304
}
You can’t perform that action at this time.
0 commit comments