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

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: address comments 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..abbc121f06b6ee30ca7b868e4e986bccb5b0b58d 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -64,6 +64,12 @@ void FlowGraphPrinter::PrintInstruction(Instruction* instr) {
if (FLAG_print_environments && (instr->env() != NULL)) {
instr->env()->PrintTo(&f);
}
+ if (print_locations_ && (instr->locs() != NULL)) {
+ instr->locs()->PrintTo(&f);
+ }
+ if (instr->lifetime_position() != -1) {
+ OS::Print("%3d: ", instr->lifetime_position());
+ }
OS::Print("%s", str);
}
@@ -417,7 +423,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 +677,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());
+ }
}
f->Print(" }");
}

Powered by Google App Engine
This is Rietveld 408576698