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

Unified Diff: src/conversions-inl.h

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/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 e09165044ddc5b43bbf4da48ef4e0bda916d3d56..ae87dc4d31b01763eef756a1058a05ca0dc1561e 100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -5,9 +5,11 @@
#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 <cstdarg>
-#include <limits>
+#include "src/globals.h" // Required for V8_INFINITY
// ----------------------------------------------------------------------------
// Extra POSIX/ANSI functions for Win32/MSVC.
@@ -481,8 +483,7 @@
}
DCHECK(buffer_pos == 0);
- return (sign == NEGATIVE) ? -std::numeric_limits<double>::infinity()
- : std::numeric_limits<double>::infinity();
+ return (sign == NEGATIVE) ? -V8_INFINITY : V8_INFINITY;
}
bool leading_zero = false;
@@ -642,7 +643,7 @@
}
}
- const int max_exponent = std::numeric_limits<int>::max() / 2;
+ const int max_exponent = 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