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

Unified Diff: src/conversions-inl.h

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/compiler/typer.cc ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions-inl.h
diff --git a/src/conversions-inl.h b/src/conversions-inl.h
index ae87dc4d31b01763eef756a1058a05ca0dc1561e..e09165044ddc5b43bbf4da48ef4e0bda916d3d56 100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -5,11 +5,9 @@
#ifndef V8_CONVERSIONS_INL_H_
#define V8_CONVERSIONS_INL_H_
-#include <float.h> // Required for DBL_MAX and on Win32 for finite()
-#include <limits.h> // Required for INT_MAX etc.
-#include <stdarg.h>
#include <cmath>
-#include "src/globals.h" // Required for V8_INFINITY
+#include <cstdarg>
+#include <limits>
// ----------------------------------------------------------------------------
// Extra POSIX/ANSI functions for Win32/MSVC.
@@ -483,7 +481,8 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
}
DCHECK(buffer_pos == 0);
- return (sign == NEGATIVE) ? -V8_INFINITY : V8_INFINITY;
+ return (sign == NEGATIVE) ? -std::numeric_limits<double>::infinity()
+ : std::numeric_limits<double>::infinity();
}
bool leading_zero = false;
@@ -643,7 +642,7 @@ double InternalStringToDouble(UnicodeCache* unicode_cache,
}
}
- const int max_exponent = INT_MAX / 2;
+ const int max_exponent = std::numeric_limits<int>::max() / 2;
DCHECK(-max_exponent / 2 <= exponent && exponent <= max_exponent / 2);
int num = 0;
do {
« no previous file with comments | « src/compiler/typer.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698