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

Unified Diff: src/strtod.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/ppc/lithium-codegen-ppc.cc ('k') | src/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/strtod.cc
diff --git a/src/strtod.cc b/src/strtod.cc
index 4f06b3979d976b914bf1b3bda59e5cb100a8c801..2b48af3cc60c93aeaadc9660d2e5e77c99268896 100644
--- a/src/strtod.cc
+++ b/src/strtod.cc
@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdarg.h>
#include <cmath>
-#include <cstdarg>
-#include <limits>
#include "src/v8.h"
@@ -353,7 +352,7 @@
static double BignumStrtod(Vector<const char> buffer,
int exponent,
double guess) {
- if (guess == std::numeric_limits<double>::infinity()) {
+ if (guess == V8_INFINITY) {
return guess;
}
@@ -409,9 +408,7 @@
kMaxSignificantDecimalDigits),
significant_exponent);
}
- if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
- return std::numeric_limits<double>::infinity();
- }
+ if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) return V8_INFINITY;
if (exponent + trimmed.length() <= kMinDecimalPower) return 0.0;
double guess;
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698