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

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: Rewrite a comment that was word salad. 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 b6b8fe6680fc3e7b6e9289fa12060378e4d0eb3d..8684c615e5bcc2b14ae78798743d2aea5675663a 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -378,7 +378,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(),
srdjan 2012/07/12 16:42:26 Maybe introduce HasSSATemp(), since there are many
Kevin Millikin (Google) 2012/07/13 15:34:59 Hmm. There are a few places where we use it to te
+ index());
}
@@ -424,6 +426,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 ");
@@ -675,6 +682,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