Chromium Code Reviews| Index: vm/il_printer.cc |
| =================================================================== |
| --- vm/il_printer.cc (revision 9430) |
| +++ vm/il_printer.cc (working copy) |
| @@ -39,15 +39,15 @@ |
| for (intptr_t i = 0; i < block_order_.length(); ++i) { |
| // Print the block entry. |
| PrintInstruction(block_order_[i]); |
| - Instruction* current = block_order_[i]->successor(); |
| // And all the successors until an exit, branch, or a block entry. |
| - while ((current != NULL) && !current->IsBlockEntry()) { |
| + ForwardInstructionIterator it(block_order_[i]); |
|
Kevin Millikin (Google)
2012/07/06 11:58:42
I'm a bit uncomfortable with calling Current() on
Florian Schneider
2012/07/06 12:31:51
Done.
|
| + for (; !it.Done(); it.Advance()) { |
| + Instruction* current = it.Current(); |
| OS::Print("\n"); |
| PrintInstruction(current); |
| - current = current->successor(); |
| } |
| BlockEntryInstr* successor = |
| - (current == NULL) ? NULL : current->AsBlockEntry(); |
| + (it.Current() == NULL) ? NULL : it.Current()->AsBlockEntry(); |
| if (successor != NULL) { |
| OS::Print(" goto %d", successor->block_id()); |
| } |