diff options
| author | 2015-05-11 13:38:14 -0700 | |
|---|---|---|
| committer | 2015-05-11 13:38:14 -0700 | |
| commit | 3d8ac11e412aeb186e2e14270d09585bc34e229e (patch) | |
| tree | 8ff9f52d12bd5f257dab531a7b3f6b9ac684540a /compiler/optimizing/graph_visualizer.cc | |
| parent | 56869c1f6441f5ba05ee155c5d8fcf4b821e0be2 (diff) | |
| parent | c54f98b9f93bc5a377aa31aaaf7eb15a9ac892f0 (diff) | |
Merge art project from goog/master into goog/mnc-dev.
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
| -rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index ca9cbc3d01..7130127136 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -211,17 +211,22 @@ class HGraphVisualizerPrinter : public HGraphVisitor { output_ << "]"; } if (instruction->HasEnvironment()) { - HEnvironment* env = instruction->GetEnvironment(); - output_ << " (env: [ "; - for (size_t i = 0, e = env->Size(); i < e; ++i) { - HInstruction* insn = env->GetInstructionAt(i); - if (insn != nullptr) { - output_ << GetTypeId(insn->GetType()) << insn->GetId() << " "; - } else { - output_ << " _ "; + output_ << " (env:"; + for (HEnvironment* environment = instruction->GetEnvironment(); + environment != nullptr; + environment = environment->GetParent()) { + output_ << " [ "; + for (size_t i = 0, e = environment->Size(); i < e; ++i) { + HInstruction* insn = environment->GetInstructionAt(i); + if (insn != nullptr) { + output_ << GetTypeId(insn->GetType()) << insn->GetId() << " "; + } else { + output_ << " _ "; + } } + output_ << "]"; } - output_ << "])"; + output_ << ")"; } if (IsPass(SsaLivenessAnalysis::kLivenessPassName) && is_after_pass_ |