diff options
author | Calin Juravle <calin@google.com> | 2015-07-22 17:19:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-22 17:19:20 +0000 |
commit | 32d7806b34efda2af0f5a0eaaa384c781565d364 (patch) | |
tree | 365d25bc21b5af5ec6dfab828de2d28acbdb8b26 /compiler/optimizing/graph_visualizer.cc | |
parent | d77aa00c583cc72f96bc4522d02d2070dcd72f1c (diff) | |
parent | 7733bd644ac71f86d4b30a319624b23343882e53 (diff) |
Merge "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 d6b5636edc..694b68ce94 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("exact") << std::boolalpha << info.IsExact() << std::noboolalpha; } } |