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

Unified Diff: test/cctest/compiler/test-schedule.cc

Issue 606403003: Refactor BasicBlock, no inheritance from GenericNode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Attempt n+1 to address the size_t madness Created 6 years, 3 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 | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-schedule.cc
diff --git a/test/cctest/compiler/test-schedule.cc b/test/cctest/compiler/test-schedule.cc
index 6c05c05916fa51c2a46e3e1c3964e6be15e1a612..63e7c2c2b716b0da72afb148053f8c60678e5fe1 100644
--- a/test/cctest/compiler/test-schedule.cc
+++ b/test/cctest/compiler/test-schedule.cc
@@ -24,7 +24,7 @@ TEST(TestScheduleAllocation) {
Schedule schedule(scope.main_zone());
CHECK_NE(NULL, schedule.start());
- CHECK_EQ(schedule.start(), *(schedule.all_blocks().begin()));
+ CHECK_EQ(schedule.start(), schedule.GetBlockById(BasicBlock::Id::FromInt(0)));
}
@@ -58,13 +58,13 @@ TEST(TestScheduleAddGoto) {
schedule.AddGoto(entry, next);
- CHECK_EQ(0, entry->PredecessorCount());
- CHECK_EQ(1, entry->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(entry->PredecessorCount()));
+ CHECK_EQ(1, static_cast<int>(entry->SuccessorCount()));
CHECK_EQ(next, entry->SuccessorAt(0));
- CHECK_EQ(1, next->PredecessorCount());
+ CHECK_EQ(1, static_cast<int>(next->PredecessorCount()));
CHECK_EQ(entry, next->PredecessorAt(0));
- CHECK_EQ(0, next->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(next->SuccessorCount()));
}
@@ -83,18 +83,18 @@ TEST(TestScheduleAddBranch) {
schedule.AddBranch(entry, b, tblock, fblock);
- CHECK_EQ(0, entry->PredecessorCount());
- CHECK_EQ(2, entry->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(entry->PredecessorCount()));
+ CHECK_EQ(2, static_cast<int>(entry->SuccessorCount()));
CHECK_EQ(tblock, entry->SuccessorAt(0));
CHECK_EQ(fblock, entry->SuccessorAt(1));
- CHECK_EQ(1, tblock->PredecessorCount());
+ CHECK_EQ(1, static_cast<int>(tblock->PredecessorCount()));
CHECK_EQ(entry, tblock->PredecessorAt(0));
- CHECK_EQ(0, tblock->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(tblock->SuccessorCount()));
- CHECK_EQ(1, fblock->PredecessorCount());
+ CHECK_EQ(1, static_cast<int>(fblock->PredecessorCount()));
CHECK_EQ(entry, fblock->PredecessorAt(0));
- CHECK_EQ(0, fblock->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(fblock->SuccessorCount()));
}
@@ -106,8 +106,8 @@ TEST(TestScheduleAddReturn) {
BasicBlock* entry = schedule.start();
schedule.AddReturn(entry, n0);
- CHECK_EQ(0, entry->PredecessorCount());
- CHECK_EQ(1, entry->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(entry->PredecessorCount()));
+ CHECK_EQ(1, static_cast<int>(entry->SuccessorCount()));
CHECK_EQ(schedule.end(), entry->SuccessorAt(0));
}
@@ -120,8 +120,8 @@ TEST(TestScheduleAddThrow) {
BasicBlock* entry = schedule.start();
schedule.AddThrow(entry, n0);
- CHECK_EQ(0, entry->PredecessorCount());
- CHECK_EQ(1, entry->SuccessorCount());
+ CHECK_EQ(0, static_cast<int>(entry->PredecessorCount()));
+ CHECK_EQ(1, static_cast<int>(entry->SuccessorCount()));
CHECK_EQ(schedule.end(), entry->SuccessorAt(0));
}
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698