diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2020-09-07 08:30:52 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2020-09-08 13:51:53 +0000 |
commit | e6c0f2a75bd969253279580e2e4772e54787034b (patch) | |
tree | 79598b2b6b457d9c718ddb18e29a0211a73ae85a /compiler/optimizing/graph_visualizer.cc | |
parent | 63c0c2d9da31d26781f5e77aba6125f0d0988795 (diff) |
Pass a full MethodReference of the invoke in HInvoke nodes.
Cleanup to ensure we don't make mistakes when passing a dex method index
to the HInvoke constructor, and we know which dex file it relates to.
Test: test.py
Change-Id: I625949add88a6b97e1dafeb7aed37961e105d6aa
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 922a6f6700..d5840fc7cf 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -456,7 +456,7 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { } void VisitInvoke(HInvoke* invoke) override { - StartAttributeStream("dex_file_index") << invoke->GetDexMethodIndex(); + StartAttributeStream("dex_file_index") << invoke->GetMethodReference().index; ArtMethod* method = invoke->GetResolvedMethod(); // We don't print signatures, which conflict with c1visualizer format. static constexpr bool kWithSignature = false; @@ -464,7 +464,7 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { // other invokes might be coming from inlined methods. ScopedObjectAccess soa(Thread::Current()); std::string method_name = (method == nullptr) - ? GetGraph()->GetDexFile().PrettyMethod(invoke->GetDexMethodIndex(), kWithSignature) + ? invoke->GetMethodReference().PrettyMethod(kWithSignature) : method->PrettyMethod(kWithSignature); StartAttributeStream("method_name") << method_name; StartAttributeStream("always_throws") << std::boolalpha |