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

Unified Diff: vm/flow_graph_builder.cc

Issue 10407031: Add IR printing into a supplied buffer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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
Index: vm/flow_graph_builder.cc
===================================================================
--- vm/flow_graph_builder.cc (revision 7705)
+++ vm/flow_graph_builder.cc (working copy)
@@ -2131,11 +2131,15 @@
// Perform a depth-first traversal of the graph to build preorder and
// postorder block orders.
graph_entry_->DiscoverBlocks(NULL, // Entry block predecessor.
- &preorder_block_entries_,
- &postorder_block_entries_,
+ this,
&parent,
&assigned_vars,
variable_count);
+ // Number blocks in reverse postorder.
+ intptr_t block_count = postorder_block_entries_.length();
+ for (intptr_t i = 0; i < block_count; ++i) {
+ postorder_block_entries_[i]->set_block_id(block_count - i - 1);
+ }
if (for_optimized) {
GrowableArray<BitVector*> dominance_frontier;
ComputeDominators(&preorder_block_entries_, &parent, &dominance_frontier);
@@ -2148,7 +2152,7 @@
reverse_postorder.Add(postorder_block_entries_[i]);
}
FlowGraphPrinter printer(function, reverse_postorder);
- printer.VisitBlocks();
+ printer.PrintBlocks();
}
}

Powered by Google App Engine
This is Rietveld 408576698