Commit 94d6a136 authored by dcarney@chromium.org's avatar dcarney@chromium.org

build fix for build fix for 14990

BUG=
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/16409011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6ee35b3e
......@@ -38,7 +38,6 @@
#ifndef V8_H_
#define V8_H_
#include <limits.h>
#include "v8stdint.h"
#ifdef _WIN32
......@@ -5683,7 +5682,9 @@ void ReturnValue<T>::Set(int32_t i) {
template<typename T>
void ReturnValue<T>::Set(uint32_t i) {
typedef internal::Internals I;
if (V8_LIKELY(i <= INT32_MAX)) {
// Can't simply use INT32_MAX here for whatever reason.
bool fits_into_int32_t = (i & (1 << 31)) == 0;
if (V8_LIKELY(fits_into_int32_t)) {
Set(static_cast<int32_t>(i));
return;
}
......
......@@ -1099,7 +1099,7 @@ THREADED_TEST(FastReturnValues) {
// check int32_t and uint32_t
int32_t int_values[] = {
0, 234, -723,
i::Smi::kMinValue, i::Smi::kMaxValue, INT32_MAX, INT32_MIN
i::Smi::kMinValue, i::Smi::kMaxValue
};
for (size_t i = 0; i < ARRAY_SIZE(int_values); i++) {
for (int modifier = -1; modifier <= 1; modifier++) {
......
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