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

Unified Diff: runtime/vm/il_printer.cc

Issue 10696151: Skeleton of a linear scan register allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 1d33db8258171a8f89bbdedee61b048de87bf10c..1b18966db0383c7dd5e24ca88e2cfb282861c1e6 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -64,6 +64,10 @@ void FlowGraphPrinter::PrintInstruction(Instruction* instr) {
if (FLAG_print_environments && (instr->env() != NULL)) {
instr->env()->PrintTo(&f);
}
+ if (print_locations_ && instr->locs() != NULL) {
srdjan 2012/07/10 23:27:54 Add parenthesis.
Vyacheslav Egorov (Google) 2012/07/11 13:27:58 Done.
+ instr->locs()->PrintTo(&f);
+ }
+ if (instr->pos() != -1) OS::Print("%3d: ", instr->pos());
OS::Print("%s", str);
}
@@ -417,7 +421,11 @@ void BranchInstr::PrintTo(BufferFormatter* f) const {
void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
- UNIMPLEMENTED();
+ f->Print(" %s ", DebugName());
+ for (intptr_t i = 0; i < moves_.length(); i++) {
+ if (i != 0) f->Print(", ");
+ f->Print("%s = %s", moves_[i].dest().Name(), moves_[i].src().Name());
+ }
}
@@ -667,6 +675,9 @@ void Environment::PrintTo(BufferFormatter* f) const {
for (intptr_t i = 0; i < values_.length(); ++i) {
if (i > 0) f->Print(", ");
values_[i]->PrintTo(f);
+ if (i < locations_.length() && !locations_[i].IsInvalid()) {
+ f->Print(" [%s]", locations_[i].Name());
srdjan 2012/07/10 23:27:54 Add parenthesis, fix indent.
Vyacheslav Egorov (Google) 2012/07/11 13:27:58 Done.
+ }
}
f->Print(" }");
}

Powered by Google App Engine
This is Rietveld 408576698