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

Unified Diff: runtime/vm/il_printer.cc

Issue 10700111: Eliminate the type distinction between BindInstr and DoInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Eliminate an unnecessary virtual function. 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 3f5bae5e8054064e2b10baf726a2022fddc2263f..fb189e3a6dcda41f0aa18a5daa7af63fef6a0221 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -367,14 +367,10 @@ void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
}
-void DoInstr::PrintTo(BufferFormatter* f) const {
- f->Print(" ");
- computation()->PrintTo(f);
-}
-
-
void BindInstr::PrintTo(BufferFormatter* f) const {
- if (ssa_temp_index() != -1) {
+ if (!is_used()) {
+ f->Print(" ");
+ } else if (ssa_temp_index() != -1) {
f->Print(" v%d <- ", ssa_temp_index());
} else {
f->Print(" t%d <- ", temp_index());
@@ -618,14 +614,10 @@ void TargetEntryInstr::PrintToVisualizer(BufferFormatter* f) const {
}
-void DoInstr::PrintToVisualizer(BufferFormatter* f) const {
- f->Print("_ ");
- computation()->PrintTo(f);
-}
-
-
void BindInstr::PrintToVisualizer(BufferFormatter* f) const {
- if (ssa_temp_index() != -1) {
+ if (!is_used()) {
+ f->Print("_ ");
+ } else if (ssa_temp_index() != -1) {
f->Print("v%d ", ssa_temp_index());
} else {
f->Print("t%d ", temp_index());
« 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