Avoid using C++ STL include <limits>.

Review URL: http://codereview.chromium.org/8041019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
lrn@chromium.org 2011-09-26 12:44:36 +00:00
parent c1b978c076
commit d554977c4c
4 changed files with 5 additions and 7 deletions

View File

@ -47,7 +47,7 @@ namespace v8 {
namespace internal {
static inline double JunkStringValue() {
return std::numeric_limits<double>::quiet_NaN();
return BitCast<double, uint64_t>(kQuietNaNMask);
}

View File

@ -28,8 +28,6 @@
#ifndef V8_CONVERSIONS_H_
#define V8_CONVERSIONS_H_
#include <limits>
#include "utils.h"
namespace v8 {

View File

@ -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<uint64_t>(0xfff) << 51;
// ASCII/UC16 constants
// Code-point values in Unicode 4.0 are 21 bits wide.
typedef uint16_t uc16;

View File

@ -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<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);