| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index c0213d2ea477ab78ec7a77c4404e7a09ea4e8429..1615a2a96b24a08d1ba4efdc4b4a982f243bb1a2 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -65,6 +65,12 @@
|
| #include "v8threads.h"
|
| #include "vm-state-inl.h"
|
|
|
| +#ifndef _STLP_VENDOR_CSTD
|
| +// STLPort doesn't import fpclassify and isless into the std namespace.
|
| +using std::fpclassify;
|
| +using std::isless;
|
| +#endif
|
| +
|
| namespace v8 {
|
| namespace internal {
|
|
|
| @@ -3963,10 +3969,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToRadixString) {
|
|
|
| // Slow case.
|
| CONVERT_DOUBLE_ARG_CHECKED(value, 0);
|
| - if (isnan(value)) {
|
| + if (std::isnan(value)) {
|
| return *isolate->factory()->nan_string();
|
| }
|
| - if (isinf(value)) {
|
| + if (std::isinf(value)) {
|
| if (value < 0) {
|
| return *isolate->factory()->minus_infinity_string();
|
| }
|
| @@ -6604,8 +6610,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberEquals) {
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| CONVERT_DOUBLE_ARG_CHECKED(y, 1);
|
| - if (isnan(x)) return Smi::FromInt(NOT_EQUAL);
|
| - if (isnan(y)) return Smi::FromInt(NOT_EQUAL);
|
| + if (std::isnan(x)) return Smi::FromInt(NOT_EQUAL);
|
| + if (std::isnan(y)) return Smi::FromInt(NOT_EQUAL);
|
| if (x == y) return Smi::FromInt(EQUAL);
|
| Object* result;
|
| if ((fpclassify(x) == FP_ZERO) && (fpclassify(y) == FP_ZERO)) {
|
| @@ -6641,7 +6647,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberCompare) {
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| CONVERT_DOUBLE_ARG_CHECKED(y, 1);
|
| - if (isnan(x) || isnan(y)) return args[2];
|
| + if (std::isnan(x) || std::isnan(y)) return args[2];
|
| if (x == y) return Smi::FromInt(EQUAL);
|
| if (isless(x, y)) return Smi::FromInt(LESS);
|
| return Smi::FromInt(GREATER);
|
| @@ -6864,7 +6870,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_atan2) {
|
| CONVERT_DOUBLE_ARG_CHECKED(x, 0);
|
| CONVERT_DOUBLE_ARG_CHECKED(y, 1);
|
| double result;
|
| - if (isinf(x) && isinf(y)) {
|
| + if (std::isinf(x) && std::isinf(y)) {
|
| // Make sure that the result in case of two infinite arguments
|
| // is a multiple of Pi / 4. The sign of the result is determined
|
| // by the first argument (x) and the sign of the second argument
|
| @@ -6947,7 +6953,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow) {
|
|
|
| CONVERT_DOUBLE_ARG_CHECKED(y, 1);
|
| double result = power_helper(x, y);
|
| - if (isnan(result)) return isolate->heap()->nan_value();
|
| + if (std::isnan(result)) return isolate->heap()->nan_value();
|
| return isolate->heap()->AllocateHeapNumber(result);
|
| }
|
|
|
| @@ -6964,7 +6970,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow_cfunction) {
|
| return Smi::FromInt(1);
|
| } else {
|
| double result = power_double_double(x, y);
|
| - if (isnan(result)) return isolate->heap()->nan_value();
|
| + if (std::isnan(result)) return isolate->heap()->nan_value();
|
| return isolate->heap()->AllocateHeapNumber(result);
|
| }
|
| }
|
| @@ -7066,7 +7072,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DateSetValue) {
|
|
|
| Object* value = NULL;
|
| bool is_value_nan = false;
|
| - if (isnan(time)) {
|
| + if (std::isnan(time)) {
|
| value = isolate->heap()->nan_value();
|
| is_value_nan = true;
|
| } else if (!is_utc &&
|
|
|