diff options
author | Calin Juravle <calin@google.com> | 2015-07-28 11:53:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-28 11:53:36 +0000 |
commit | 431403ad1f65da63de9e20ba7d89c3ea5f4b1272 (patch) | |
tree | 0b4252128815c8520128a3dbc2dacac698634ba0 /compiler/optimizing/graph_visualizer.cc | |
parent | 48215e2e9b519682555d33fe695e894d601d7647 (diff) | |
parent | b734808d0c93af98ec4e3539fdb0a8c0787263b0 (diff) |
Merge "Revert "Revert "Revert "Use the object class as top in reference type propagation""""
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index edc271a255..46d821ef77 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -469,14 +469,19 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { if (instruction->IsLoadClass()) { ReferenceTypeInfo info = instruction->AsLoadClass()->GetLoadedClassRTI(); ScopedObjectAccess soa(Thread::Current()); - DCHECK(info.IsValid()) << "Invalid RTI for " << instruction->DebugName(); - StartAttributeStream("klass") << PrettyDescriptor(info.GetTypeHandle().Get()); - StartAttributeStream("exact") << std::boolalpha << info.IsExact() << std::noboolalpha; + if (info.GetTypeHandle().GetReference() != nullptr) { + StartAttributeStream("klass") << PrettyDescriptor(info.GetTypeHandle().Get()); + } else { + StartAttributeStream("klass") << "unresolved"; + } } else { ReferenceTypeInfo info = instruction->GetReferenceTypeInfo(); - ScopedObjectAccess soa(Thread::Current()); - DCHECK(info.IsValid()) << "Invalid RTI for " << instruction->DebugName(); - StartAttributeStream("klass") << PrettyDescriptor(info.GetTypeHandle().Get()); + if (info.IsTop()) { + StartAttributeStream("klass") << "java.lang.Object"; + } else { + ScopedObjectAccess soa(Thread::Current()); + StartAttributeStream("klass") << PrettyDescriptor(info.GetTypeHandle().Get()); + } StartAttributeStream("can_be_null") << std::boolalpha << instruction->CanBeNull() << std::noboolalpha; StartAttributeStream("exact") << std::boolalpha << info.IsExact() << std::noboolalpha; |