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

Unified Diff: vm/il_printer.cc

Issue 10700034: Add a goto instruction to the IL use it to terminate basic blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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/il_printer.cc
===================================================================
--- vm/il_printer.cc (revision 9101)
+++ vm/il_printer.cc (working copy)
@@ -44,11 +44,6 @@
PrintInstruction(current);
current = current->StraightLineSuccessor();
}
- BlockEntryInstr* successor =
- (current == NULL) ? NULL : current->AsBlockEntry();
- if (successor != NULL) {
- OS::Print(" goto %d", successor->block_id());
- }
OS::Print("\n");
}
}
@@ -412,6 +407,11 @@
}
+void GotoInstr::PrintTo(BufferFormatter* f) const {
+ f->Print(" goto %d", successor_->block_id());
+}
+
+
void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
UNIMPLEMENTED();
}
@@ -531,11 +531,6 @@
PrintInstruction(current);
current = current->StraightLineSuccessor();
}
- BlockEntryInstr* successor =
- (current == NULL) ? NULL : current->AsBlockEntry();
- if (successor != NULL) {
- Print("0 0 _ Goto B%d <|@\n", successor->block_id());
- }
END("HIR");
}
END("block");
@@ -644,6 +639,11 @@
}
+void GotoInstr::PrintToVisualizer(BufferFormatter* f) const {
+ f->Print("_ Goto (B%d)", successor_->block_id());
+}
+
+
void ParallelMoveInstr::PrintToVisualizer(BufferFormatter* f) const {
UNIMPLEMENTED();
}

Powered by Google App Engine
This is Rietveld 408576698