| Index: src/assembler.cc
|
| diff --git a/src/assembler.cc b/src/assembler.cc
|
| index 5bde8c5383ee67551dcb4fc4d1ca59785e7e9bd6..84d720b248e7efc2e7492881a2be8f6cc43046c9 100644
|
| --- a/src/assembler.cc
|
| +++ b/src/assembler.cc
|
| @@ -34,7 +34,7 @@
|
|
|
| #include "assembler.h"
|
|
|
| -#include <math.h> // For cos, log, pow, sin, tan, etc.
|
| +#include <cmath>
|
| #include "api.h"
|
| #include "builtins.h"
|
| #include "counters.h"
|
| @@ -1459,10 +1459,11 @@ double power_helper(double x, double y) {
|
| return power_double_int(x, y_int); // Returns 1 if exponent is 0.
|
| }
|
| if (y == 0.5) {
|
| - return (isinf(x)) ? V8_INFINITY : fast_sqrt(x + 0.0); // Convert -0 to +0.
|
| + return (std::isinf(x)) ? V8_INFINITY
|
| + : fast_sqrt(x + 0.0); // Convert -0 to +0.
|
| }
|
| if (y == -0.5) {
|
| - return (isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
|
| + return (std::isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
|
| }
|
| return power_double_double(x, y);
|
| }
|
| @@ -1492,7 +1493,7 @@ double power_double_double(double x, double y) {
|
| (!defined(__MINGW64_VERSION_RC) || __MINGW64_VERSION_RC < 1)
|
| // MinGW64 has a custom implementation for pow. This handles certain
|
| // special cases that are different.
|
| - if ((x == 0.0 || isinf(x)) && isfinite(y)) {
|
| + if ((x == 0.0 || std::isinf(x)) && std::isfinite(y)) {
|
| double f;
|
| if (modf(y, &f) != 0.0) return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
|
| }
|
| @@ -1505,7 +1506,9 @@ double power_double_double(double x, double y) {
|
|
|
| // The checks for special cases can be dropped in ia32 because it has already
|
| // been done in generated code before bailing out here.
|
| - if (isnan(y) || ((x == 1 || x == -1) && isinf(y))) return OS::nan_value();
|
| + if (std::isnan(y) || ((x == 1 || x == -1) && std::isinf(y))) {
|
| + return OS::nan_value();
|
| + }
|
| return pow(x, y);
|
| }
|
|
|
|
|