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

Unified Diff: runtime/vm/flow_graph.cc

Issue 12317007: Remove two more places where we computed use lists and add verification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index deed8c0007feeb5dcc0f83ca3f5884f13318a7c1..67bb2da4a5fa6c854fb41e335e1745c0bdcc77a8 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -172,7 +172,7 @@ bool FlowGraph::ResetUseLists() {
}
-static void ValidateUseListsInInstruction(Instruction* instr) {
+static void VerifyUseListsInInstruction(Instruction* instr) {
ASSERT(instr != NULL);
ASSERT(!instr->IsJoinEntry());
for (intptr_t i = 0; i < instr->InputCount(); ++i) {
@@ -233,24 +233,24 @@ static void ValidateUseListsInInstruction(Instruction* instr) {
}
-bool FlowGraph::ValidateUseLists() {
- // Validate initial definitions.
+bool FlowGraph::VerifyUseLists() {
+ // Verify the initial definitions.
for (intptr_t i = 0; i < graph_entry_->initial_definitions()->length(); ++i) {
- ValidateUseListsInInstruction((*graph_entry_->initial_definitions())[i]);
+ VerifyUseListsInInstruction((*graph_entry_->initial_definitions())[i]);
}
- // Validate phis in join entries and the instructions in each block.
+ // Verify phis in join entries and the instructions in each block.
for (intptr_t i = 0; i < preorder_.length(); ++i) {
BlockEntryInstr* entry = preorder_[i];
JoinEntryInstr* join = entry->AsJoinEntry();
if (join != NULL && join->phis() != NULL) {
for (intptr_t i = 0; i < join->phis()->length(); ++i) {
PhiInstr* phi = (*join->phis())[i];
- if (phi != NULL) ValidateUseListsInInstruction(phi);
+ if (phi != NULL) VerifyUseListsInInstruction(phi);
}
}
for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
- ValidateUseListsInInstruction(it.Current());
+ VerifyUseListsInInstruction(it.Current());
}
}
return true; // Return true so we can ASSERT validation.
@@ -356,7 +356,7 @@ void FlowGraph::ComputeUseLists() {
ClearUseLists((*graph_entry_->initial_definitions())[i]);
}
ComputeUseListsRecursive(graph_entry_);
- DEBUG_ASSERT(!FLAG_verify_compiler || ValidateUseLists());
+ DEBUG_ASSERT(!FLAG_verify_compiler || VerifyUseLists());
}
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698