summaryrefslogtreecommitdiff
path: root/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
index 807cfe7..023fe13 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
@@ -29,6 +29,8 @@
#include <wtf/RandomNumber.h>
#include <wtf/RandomNumberSeed.h>
+using std::signbit;
+
namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(MathObject);
@@ -168,7 +170,7 @@ JSValue JSC_HOST_CALL mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, cons
double result = -Inf;
for (unsigned k = 0; k < argsCount; ++k) {
double val = args.at(k).toNumber(exec);
- if (isnan(val)) {
+ if (std::isnan(val)) {
result = NaN;
break;
}
@@ -184,7 +186,7 @@ JSValue JSC_HOST_CALL mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, cons
double result = +Inf;
for (unsigned k = 0; k < argsCount; ++k) {
double val = args.at(k).toNumber(exec);
- if (isnan(val)) {
+ if (std::isnan(val)) {
result = NaN;
break;
}
@@ -201,9 +203,9 @@ JSValue JSC_HOST_CALL mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, cons
double arg = args.at(0).toNumber(exec);
double arg2 = args.at(1).toNumber(exec);
- if (isnan(arg2))
+ if (std::isnan(arg2))
return jsNaN(exec);
- if (isinf(arg2) && fabs(arg) == 1)
+ if (std::isinf(arg2) && fabs(arg) == 1)
return jsNaN(exec);
return jsNumber(exec, pow(arg, arg2));
}