From: lrn@chromium.org Date: Mon, 26 Sep 2011 12:44:36 +0000 (+0000) Subject: Avoid using C++ STL include . X-Git-Tag: upstream/4.7.83~18362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d554977c4c608c4654729101b0cacc2aed3fbdff;p=platform%2Fupstream%2Fv8.git Avoid using C++ STL include . Review URL: http://codereview.chromium.org/8041019 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/conversions-inl.h b/src/conversions-inl.h index 41cf0d54c..8bc11bf83 100644 --- a/src/conversions-inl.h +++ b/src/conversions-inl.h @@ -47,7 +47,7 @@ namespace v8 { namespace internal { static inline double JunkStringValue() { - return std::numeric_limits::quiet_NaN(); + return BitCast(kQuietNaNMask); } diff --git a/src/conversions.h b/src/conversions.h index e51ad6501..31aaf6b73 100644 --- a/src/conversions.h +++ b/src/conversions.h @@ -28,8 +28,6 @@ #ifndef V8_CONVERSIONS_H_ #define V8_CONVERSIONS_H_ -#include - #include "utils.h" namespace v8 { diff --git a/src/globals.h b/src/globals.h index 6c6966aee..d0c78d6e2 100644 --- a/src/globals.h +++ b/src/globals.h @@ -255,6 +255,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(0xfff) << 51; + // ASCII/UC16 constants // Code-point values in Unicode 4.0 are 21 bits wide. typedef uint16_t uc16; diff --git a/src/v8globals.h b/src/v8globals.h index 68503979f..3667ca624 100644 --- a/src/v8globals.h +++ b/src/v8globals.h @@ -100,10 +100,6 @@ const int kPageSizeBits = 20; 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(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);