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

Unified Diff: runtime/vm/il_printer.cc

Issue 10735071: Introduce Goto instructions to the flow graph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaked instruction numbering. 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
Index: runtime/vm/il_printer.cc
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 15fafe4566e80fdff65c745347af01bc5deb0a3d..e227a858fd4eb369f6cc6eeb531c30a8553f038b 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -394,7 +394,9 @@ void PhiInstr::PrintTo(BufferFormatter* f) const {
void ParameterInstr::PrintTo(BufferFormatter* f) const {
- f->Print(" v%d <- parameter(%d)", index());
+ f->Print(" v%d <- parameter(%d)",
+ (ssa_temp_index() != -1) ? ssa_temp_index() : temp_index(),
+ index());
}
@@ -440,6 +442,11 @@ void ReThrowInstr::PrintTo(BufferFormatter* f) const {
}
+void GotoInstr::PrintTo(BufferFormatter* f) const {
+ f->Print(" goto %d", successor()->block_id());
+}
+
+
void BranchInstr::PrintTo(BufferFormatter* f) const {
f->Print(" %s ", DebugName());
f->Print("if ");
@@ -691,6 +698,11 @@ void ReThrowInstr::PrintToVisualizer(BufferFormatter* f) const {
}
+void GotoInstr::PrintToVisualizer(BufferFormatter* f) const {
+ f->Print("_ goto B%d", successor()->block_id());
+}
+
+
void BranchInstr::PrintToVisualizer(BufferFormatter* f) const {
f->Print("_ %s ", DebugName());
f->Print("if ");

Powered by Google App Engine
This is Rietveld 408576698