Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1513)

Unified Diff: test/cctest/compiler/test-changes-lowering.cc

Issue 435883002: Fix compile error on Win32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-changes-lowering.cc
diff --git a/test/cctest/compiler/test-changes-lowering.cc b/test/cctest/compiler/test-changes-lowering.cc
index fa7faee74f1ae03271712cd749cee5985bb7aab5..9efd7d23a88dee8f7ab2c0f3d0fb0cc75a653fde 100644
--- a/test/cctest/compiler/test-changes-lowering.cc
+++ b/test/cctest/compiler/test-changes-lowering.cc
@@ -293,9 +293,19 @@ TEST(RunChangeBitToBool) {
}
-// 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 @@ TEST(RunChangeInt32ToTagged) {
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 @@ TEST(RunChangeInt32ToTagged) {
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 @@ TEST(RunChangeUint32ToTagged) {
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 @@ TEST(RunChangeUint32ToTagged) {
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);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698