[builtins] Replace V8_INFINITY with its definition

V8_INFINITY is not defined here.
"src/common/globals.h" is also not allowed to be included
in this source file.

Change-Id: Ia3b14db8ac5099b6ce65839eb0fc59340dc59555
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062930
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66336}
This commit is contained in:
Milad Farazmand 2020-02-18 18:45:02 +00:00 committed by Commit Bot
parent e2a1eef35b
commit 73f91a2d11

View File

@ -2604,7 +2604,8 @@ double pow(double x, double y) {
// special cases that are different.
if ((x == 0.0 || std::isinf(x)) && y != 0.0 && std::isfinite(y)) {
double f;
double result = ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
double result =
((x == 0.0) ^ (y > 0)) ? std::numeric_limits<double>::infinity() : 0;
// retain sign if odd integer exponent
return ((std::modf(y, &f) == 0.0) && (static_cast<int64_t>(y) & 1))
? copysign(result, x)