Revision: 22782
Author:   [email protected]
Date:     Fri Aug  1 08:38:16 2014 UTC
Log:      Fix compile error on Win32.

[email protected]
BUG=

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

Modified:
 /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc

=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc Fri Aug 1 08:16:19 2014 UTC +++ /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc Fri Aug 1 08:38:16 2014 UTC
@@ -293,9 +293,19 @@
 }


-// TODO(titzer): enable all UI32 -> Tagged checking when inline allocation
-// works.
-#define TODO_UI32_TO_TAGGED_WILL_WORK(v) Smi::IsValid(static_cast<double>(v))
+bool TODO_INT32_TO_TAGGED_WILL_WORK(int32_t v) {
+ // TODO(titzer): enable all UI32 -> Tagged checking when inline allocation
+  // works.
+  return Smi::IsValid(v);
+}
+
+
+bool TODO_UINT32_TO_TAGGED_WILL_WORK(uint32_t v) {
+ // TODO(titzer): enable all UI32 -> Tagged checking when inline allocation
+  // works.
+  return v <= static_cast<uint32_t>(Smi::kMaxValue);
+}
+

 TEST(RunChangeInt32ToTagged) {
   ChangesLoweringTester<Object*> t;
@@ -307,7 +317,7 @@
     FOR_INT32_INPUTS(i) {
       input = *i;
       Object* result = t.CallWithPotentialGC<Object>();
-      if (TODO_UI32_TO_TAGGED_WILL_WORK(input)) {
+      if (TODO_INT32_TO_TAGGED_WILL_WORK(input)) {
         t.CheckNumber(static_cast<double>(input), result);
       }
     }
@@ -318,7 +328,7 @@
       input = *i;
       SimulateFullSpace(CcTest::heap()->new_space());
       Object* result = t.CallWithPotentialGC<Object>();
-      if (TODO_UI32_TO_TAGGED_WILL_WORK(input)) {
+      if (TODO_INT32_TO_TAGGED_WILL_WORK(input)) {
         t.CheckNumber(static_cast<double>(input), result);
       }
     }
@@ -337,7 +347,7 @@
       input = *i;
       Object* result = t.CallWithPotentialGC<Object>();
       double expected = static_cast<double>(input);
-      if (TODO_UI32_TO_TAGGED_WILL_WORK(input)) {
+      if (TODO_UINT32_TO_TAGGED_WILL_WORK(input)) {
         t.CheckNumber(expected, result);
       }
     }
@@ -349,7 +359,7 @@
       SimulateFullSpace(CcTest::heap()->new_space());
       Object* result = t.CallWithPotentialGC<Object>();
       double expected = static_cast<double>(static_cast<uint32_t>(input));
-      if (TODO_UI32_TO_TAGGED_WILL_WORK(input)) {
+      if (TODO_UINT32_TO_TAGGED_WILL_WORK(input)) {
         t.CheckNumber(expected, result);
       }
     }

--
--
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/d/optout.

Reply via email to