summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/art_method-inl.h4
-rw-r--r--runtime/art_method.h3
-rw-r--r--runtime/thread.cc3
3 files changed, 8 insertions, 2 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index 3b4c3ef9e1..476c894cdb 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -481,6 +481,10 @@ inline const dex::ProtoId& ArtMethod::GetPrototype() {
return dex_file->GetMethodPrototype(dex_file->GetMethodId(GetDexMethodIndex()));
}
+inline const dex::ProtoIndex ArtMethod::GetProtoIndex() {
+ return GetDexFile()->GetIndexForProtoId(GetPrototype());
+}
+
inline const dex::TypeList* ArtMethod::GetParameterTypeList() {
DCHECK(!IsProxyMethod());
const DexFile* dex_file = GetDexFile();
diff --git a/runtime/art_method.h b/runtime/art_method.h
index 1884d715e1..c941696c29 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -31,6 +31,7 @@
#include "base/pointer_size.h"
#include "base/runtime_debug.h"
#include "dex/dex_file_structs.h"
+#include "dex/dex_file_types.h"
#include "dex/modifiers.h"
#include "dex/primitive.h"
#include "interpreter/mterp/nterp.h"
@@ -975,6 +976,8 @@ class EXPORT ArtMethod final {
const dex::ProtoId& GetPrototype() REQUIRES_SHARED(Locks::mutator_lock_);
+ const dex::ProtoIndex GetProtoIndex() REQUIRES_SHARED(Locks::mutator_lock_);
+
const dex::TypeList* GetParameterTypeList() REQUIRES_SHARED(Locks::mutator_lock_);
const char* GetDeclaringClassSourceFile() REQUIRES_SHARED(Locks::mutator_lock_);
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 1c2e95c84d..fb8b24ab34 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -3328,8 +3328,7 @@ jobjectArray Thread::InternalStackTraceToStackTraceElementArray(
return nullptr;
}
- dex::ProtoIndex proto_idx =
- method->GetDexFile()->GetIndexForProtoId(interface_method->GetPrototype());
+ dex::ProtoIndex proto_idx = interface_method->GetProtoIndex();
Handle<mirror::MethodType> method_type_object(hs.NewHandle<mirror::MethodType>(
class_linker->ResolveMethodType(soa.Self(), proto_idx, interface_method)));
if (method_type_object == nullptr) {