Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: src/assembler.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 958b4009fe1eb08b9585abbdd2ee1d1cc9f9d9c9..c73b470c28cb47592e502879253901488ce9483f 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -35,8 +35,6 @@
#include "src/assembler.h"
#include <cmath>
-#include <limits>
-
#include "src/api.h"
#include "src/base/cpu.h"
#include "src/base/functional.h"
@@ -888,7 +886,7 @@
double_constants.minus_one_half = -0.5;
double_constants.canonical_non_hole_nan = base::OS::nan_value();
double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64);
- double_constants.negative_infinity = -std::numeric_limits<double>::infinity();
+ double_constants.negative_infinity = -V8_INFINITY;
double_constants.uint32_bias =
static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1;
@@ -912,7 +910,7 @@
math_exp_constants_array[0] = -708.39641853226408;
// Input values larger than this always return +Infinity.
math_exp_constants_array[1] = 709.78271289338397;
- math_exp_constants_array[2] = std::numeric_limits<double>::infinity();
+ math_exp_constants_array[2] = V8_INFINITY;
// The rest is black magic. Do not attempt to understand it. It is
// loosely based on the "expd" function published at:
// http://herumi.blogspot.com/2011/08/fast-double-precision-exponential.html
@@ -1415,7 +1413,7 @@
return power_double_int(x, y_int); // Returns 1 if exponent is 0.
}
if (y == 0.5) {
- return (std::isinf(x)) ? std::numeric_limits<double>::infinity()
+ return (std::isinf(x)) ? V8_INFINITY
: fast_sqrt(x + 0.0); // Convert -0 to +0.
}
if (y == -0.5) {
@@ -1452,8 +1450,7 @@
if ((x == 0.0 || std::isinf(x)) && std::isfinite(y)) {
double f;
if (std::modf(y, &f) != 0.0) {
- return ((x == 0.0) ^ (y > 0)) ? std::numeric_limits<double>::infinity()
- : 0.0;
+ return ((x == 0.0) ^ (y > 0)) ? V8_INFINITY : 0;
}
}
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698