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

Unified Diff: runtime/vm/il_printer.cc

Issue 10704119: Use the instruction iterator rather than an explicit loop in more places. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/il_printer.cc
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 10b172406df5f385eab2dec5344a36cbd358a1c4..1d33db8258171a8f89bbdedee61b048de87bf10c 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -531,10 +531,9 @@ void FlowGraphVisualizer::PrintFunction() {
Print("0 0 "); // Required fields "bci" and "use". Unused.
PrintInstruction(block_order_[i]);
// And all the successors until an exit, branch, or a block entry.
- Instruction* current = block_order_[i];
- for (ForwardInstructionIterator it(current->AsBlockEntry());
- !it.Done();
- it.Advance()) {
+ BlockEntryInstr* entry = block_order_[i];
+ Instruction* current = entry;
+ for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
current = it.Current();
Print("0 0 ");
PrintInstruction(current);
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698