Revision: 9441
Author:   [email protected]
Date:     Tue Sep 27 00:55:59 2011
Log:      Port r9428 to 3.5 branch.

Avoid using C++ STL include <limits>.

Review URL: http://codereview.chromium.org/8055009
http://code.google.com/p/v8/source/detail?r=9441

Modified:
 /branches/3.5/src/conversions-inl.h
 /branches/3.5/src/conversions.h
 /branches/3.5/src/globals.h
 /branches/3.5/src/v8globals.h
 /branches/3.5/src/version.cc

=======================================
--- /branches/3.5/src/conversions-inl.h Wed Jul 20 06:44:42 2011
+++ /branches/3.5/src/conversions-inl.h Tue Sep 27 00:55:59 2011
@@ -44,7 +44,7 @@
 namespace internal {

 static inline double JunkStringValue() {
-  return std::numeric_limits<double>::quiet_NaN();
+  return BitCast<double, uint64_t>(kQuietNaNMask);
 }


=======================================
--- /branches/3.5/src/conversions.h     Mon Jul 11 04:41:22 2011
+++ /branches/3.5/src/conversions.h     Tue Sep 27 00:55:59 2011
@@ -28,9 +28,8 @@
 #ifndef V8_CONVERSIONS_H_
 #define V8_CONVERSIONS_H_

-#include <limits>
-
 #include "scanner-base.h"
+#include "utils.h"

 namespace v8 {
 namespace internal {
=======================================
--- /branches/3.5/src/globals.h Mon Jul 18 02:50:57 2011
+++ /branches/3.5/src/globals.h Tue Sep 27 00:55:59 2011
@@ -226,6 +226,10 @@
 const int kBinary32MantissaBits = 23;
 const int kBinary32ExponentShift = 23;

+// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
+// other bits set.
+const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
+
 // ASCII/UC16 constants
 // Code-point values in Unicode 4.0 are 21 bits wide.
 typedef uint16_t uc16;
=======================================
--- /branches/3.5/src/v8globals.h       Mon Jul 18 02:50:57 2011
+++ /branches/3.5/src/v8globals.h       Tue Sep 27 00:55:59 2011
@@ -98,10 +98,6 @@
 const int kProcessorCacheLineSize = 64;

 // Constants relevant to double precision floating point numbers.
-
-// Quiet NaNs have bits 51 to 62 set, possibly the sign bit, and no
-// other bits set.
-const uint64_t kQuietNaNMask = static_cast<uint64_t>(0xfff) << 51;
 // If looking only at the top 32 bits, the QNaN mask is bits 19 to 30.
 const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32);

=======================================
--- /branches/3.5/src/version.cc        Mon Sep 26 11:12:50 2011
+++ /branches/3.5/src/version.cc        Tue Sep 27 00:55:59 2011
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     5
 #define BUILD_NUMBER      10
-#define PATCH_LEVEL       13
+#define PATCH_LEVEL       14
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to