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

Unified Diff: src/strtod.cc

Issue 798413003: Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Svens smiley. 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 2b48af3cc60c93aeaadc9660d2e5e77c99268896..4f06b3979d976b914bf1b3bda59e5cb100a8c801 100644
--- a/src/strtod.cc
+++ b/src/strtod.cc
@@ -2,8 +2,9 @@
// 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"
@@ -352,7 +353,7 @@ static bool DiyFpStrtod(Vector<const char> buffer,
static double BignumStrtod(Vector<const char> buffer,
int exponent,
double guess) {
- if (guess == V8_INFINITY) {
+ if (guess == std::numeric_limits<double>::infinity()) {
return guess;
}
@@ -408,7 +409,9 @@ double Strtod(Vector<const char> buffer, int exponent) {
kMaxSignificantDecimalDigits),
significant_exponent);
}
- if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) return V8_INFINITY;
+ if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
+ return std::numeric_limits<double>::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