summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
author Orion Hodson <oth@google.com> 2017-09-22 16:17:41 +0100
committer Orion Hodson <oth@google.com> 2017-10-02 16:08:18 +0100
commit2e59994c3c586d8b753e4b14a94c81bce3dba1a9 (patch)
treeab749ce709732821c7c00c81eb76afef032fd888 /runtime/class_linker.cc
parent865a0503515f78611dce103bd04b7c66c051d304 (diff)
ART: support for const-method-{handle,type}
Adds support for const-method-handle and const-method-type bytecodes. Bug: 66562269 Test: art/test/run-test --host 979 Test: art/test/dexdump/run-all-tests Change-Id: I812eaf0f2439d6126b4287483fe2348366cacf90
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 772f0420fd..eeb5569995 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -8033,6 +8033,15 @@ mirror::MethodType* ClassLinker::ResolveMethodType(const DexFile& dex_file,
return type.Get();
}
+mirror::MethodType* ClassLinker::ResolveMethodType(uint32_t proto_idx, ArtMethod* referrer) {
+ Thread* const self = Thread::Current();
+ StackHandleScope<2> hs(self);
+ const DexFile* dex_file = referrer->GetDexFile();
+ Handle<mirror::DexCache> dex_cache(hs.NewHandle(referrer->GetDexCache()));
+ Handle<mirror::ClassLoader> class_loader(hs.NewHandle(referrer->GetClassLoader()));
+ return ResolveMethodType(*dex_file, proto_idx, dex_cache, class_loader);
+}
+
mirror::MethodHandle* ClassLinker::ResolveMethodHandleForField(
Thread* self,
const DexFile::MethodHandleItem& method_handle,