| Index: vm/il_printer.cc
|
| ===================================================================
|
| --- vm/il_printer.cc (revision 9340)
|
| +++ vm/il_printer.cc (working copy)
|
| @@ -9,7 +9,9 @@
|
|
|
| namespace dart {
|
|
|
| +DEFINE_FLAG(bool, print_environments, false, "Print SSA environments.");
|
|
|
| +
|
| void BufferFormatter::Print(const char* format, ...) {
|
| va_list args;
|
| va_start(args, format);
|
| @@ -58,6 +60,9 @@
|
| char str[120];
|
| BufferFormatter f(str, sizeof(str));
|
| instr->PrintTo(&f);
|
| + if (FLAG_print_environments && (instr->env() != NULL)) {
|
| + instr->env()->PrintTo(&f);
|
| + }
|
| OS::Print("%s", str);
|
| }
|
|
|
| @@ -433,6 +438,9 @@
|
| char str[120];
|
| BufferFormatter f(str, sizeof(str));
|
| instr->PrintToVisualizer(&f);
|
| + if (FLAG_print_environments && (instr->env() != NULL)) {
|
| + instr->env()->PrintTo(&f);
|
| + }
|
| f.Print(" <|@\n");
|
| (*Dart::flow_graph_writer())(str, strlen(str));
|
| }
|
| @@ -649,5 +657,13 @@
|
| }
|
|
|
|
|
| +void Environment::PrintTo(BufferFormatter* f) const {
|
| + f->Print(" env={ ");
|
| + for (intptr_t i = 0; i < values_.length(); ++i) {
|
| + if (i > 0) f->Print(", ");
|
| + values_[i]->PrintTo(f);
|
| + }
|
| + f->Print(" }");
|
| +}
|
|
|
| } // namespace dart
|
|
|