Reviewers: Mads Ager,
Message:
TBR: ager
Description:
Port r9428 to 3.5 branch.
Avoid using C++ STL include <limits>.
Please review this at http://codereview.chromium.org/8055009/
SVN Base: https://v8.googlecode.com/svn/branches/3.5
Affected files:
M src/conversions-inl.h
M src/conversions.h
M src/globals.h
M src/v8globals.h
M src/version.cc
Index: src/conversions-inl.h
diff --git a/src/conversions-inl.h b/src/conversions-inl.h
index
b828638568aa8e687773c52f51472ac20b7f56e5..1a20645a17d52a74bcea02a320899b369cfc7409
100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -44,7 +44,7 @@ namespace v8 {
namespace internal {
static inline double JunkStringValue() {
- return std::numeric_limits<double>::quiet_NaN();
+ return BitCast<double, uint64_t>(kQuietNaNMask);
}
Index: src/conversions.h
diff --git a/src/conversions.h b/src/conversions.h
index
7b02c47f6a0feeec3e960ebc29967274e58eb14d..9c0b8f3560bf4e8de36817ec172d20c29e6cc765
100644
--- a/src/conversions.h
+++ b/src/conversions.h
@@ -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 {
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index
bb9d0a8e8bb5578ddb0b6819b7bfc939f538c00e..7e41f976661b5dc5b7663f9928adb741b60030a9
100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -226,6 +226,10 @@ const int kBinary32MinExponent = 0x01;
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;
Index: src/v8globals.h
diff --git a/src/v8globals.h b/src/v8globals.h
index
aff27579f8d78b6cd8337f9b8fba578237993c42..f05a702e1a137dee0a9588482a68875c64288c7f
100644
--- a/src/v8globals.h
+++ b/src/v8globals.h
@@ -98,10 +98,6 @@ const int kPageSizeBits = 13;
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);
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index
09cf1c2a5b7ab367f7858797f568fbbd3c3033e2..5f3680466f9d3c2cbcbb865bb42ab1dc7c363424
100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -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