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

Unified Diff: runtime/vm/il_printer.cc

Issue 10939031: Replace start_env with initial_definitions in GraphEntryInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 2f1247a377f3e8424c61a1550dd70443a9c56167..8d989df7ba79b4360943af04767894c8326a2da6 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -446,21 +446,14 @@ void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const {
void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
+ const GrowableArray<Definition*>& defns = initial_definitions_;
f->Print("B%"Pd"[graph]", block_id());
- if ((constant_null() != NULL) || (start_env() != NULL)) {
+ if (defns.length() > 0) {
f->Print(" {");
- if (constant_null() != NULL) {
+ for (intptr_t i = 0; i < defns.length(); ++i) {
+ Definition* def = defns[i];
f->Print("\n ");
- constant_null()->PrintTo(f);
- }
- if (start_env() != NULL) {
- for (intptr_t i = 0; i < start_env()->Length(); ++i) {
- Definition* def = start_env()->ValueAt(i)->definition();
- if (def->IsParameter()) {
- f->Print("\n ");
- def->PrintTo(f);
- }
- }
+ def->PrintTo(f);
}
f->Print("\n}");
}
@@ -704,9 +697,15 @@ void FlowGraphVisualizer::PrintFunction() {
// "result instruction(op1, op2)" where result is a temporary name
// or _ for instruction without result.
void GraphEntryInstr::PrintToVisualizer(BufferFormatter* f) const {
+ const GrowableArray<Definition*>& defns = initial_definitions_;
f->Print("_ [graph]");
- if (start_env_ != NULL) {
- start_env_->PrintTo(f);
+ if (defns.length() > 0) {
+ f->Print(" init={ ");
+ for (intptr_t i = 0; i < defns.length(); ++i) {
+ if (i > 0) f->Print(", ");
+ defns[i]->PrintTo(f);
+ }
+ f->Print(" }");
}
}

Powered by Google App Engine
This is Rietveld 408576698