Commit 73f91a2d authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

[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/+/2062930Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66336}
parent e2a1eef3
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment