Fix Win32 build.

Use correct constants for min/max-int.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 51495beb
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#ifndef V8_NUMBER_INFO_H_ #ifndef V8_NUMBER_INFO_H_
#define V8_NUMBER_INFO_H_ #define V8_NUMBER_INFO_H_
#include "globals.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -115,8 +117,8 @@ class NumberInfo { ...@@ -115,8 +117,8 @@ class NumberInfo {
// 32-bit integer or as an unsigned 32-bit integer. It has to be // 32-bit integer or as an unsigned 32-bit integer. It has to be
// in the range [-2^31, 2^32 - 1]. // in the range [-2^31, 2^32 - 1].
static inline bool IsInt32Double(double value) { static inline bool IsInt32Double(double value) {
if (value >= -0x80000000 && value <= 0xffffffffu) { if (value >= kMinInt && value <= kMaxUInt32) {
if (value <= 0x7fffffff && value == static_cast<int32_t>(value)) { if (value <= kMaxInt && value == static_cast<int32_t>(value)) {
return true; return true;
} }
if (value == static_cast<uint32_t>(value)) return true; if (value == static_cast<uint32_t>(value)) return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment