Revision: 14993
Author:   [email protected]
Date:     Fri Jun  7 01:15:00 2013
Log:      build fix for build fix for 14990

BUG=
[email protected]

Review URL: https://codereview.chromium.org/16409011
http://code.google.com/p/v8/source/detail?r=14993

Modified:
 /branches/bleeding_edge/include/v8.h
 /branches/bleeding_edge/test/cctest/test-api.cc

=======================================
--- /branches/bleeding_edge/include/v8.h        Fri Jun  7 00:54:39 2013
+++ /branches/bleeding_edge/include/v8.h        Fri Jun  7 01:15:00 2013
@@ -38,7 +38,6 @@
 #ifndef V8_H_
 #define V8_H_

-#include <limits.h>
 #include "v8stdint.h"

 #ifdef _WIN32
@@ -5683,7 +5682,9 @@
 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;
   }
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc     Fri Jun  7 00:34:25 2013
+++ /branches/bleeding_edge/test/cctest/test-api.cc     Fri Jun  7 01:15:00 2013
@@ -1099,7 +1099,7 @@
   // 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++) {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to