diff options
Diffstat (limited to 'runtime/class_linker.h')
| -rw-r--r-- | runtime/class_linker.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index a880a10eb8..e27a53d15c 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -55,6 +55,8 @@ namespace mirror { class DexCacheMethodHandlesTest_Open_Test; class DexCacheTest_Open_Test; class IfTable; + class MethodHandle; + class MethodHandlesLookup; class MethodType; template<class T> class ObjectArray; class StackTraceElement; @@ -106,7 +108,9 @@ class ClassLinker { kJavaLangReflectConstructorArrayClass, kJavaLangReflectFieldArrayClass, kJavaLangReflectMethodArrayClass, + kJavaLangInvokeCallSite, kJavaLangInvokeMethodHandleImpl, + kJavaLangInvokeMethodHandlesLookup, kJavaLangInvokeMethodType, kJavaLangClassLoader, kJavaLangThrowable, @@ -262,6 +266,10 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_, !Roles::uninterruptible_); + mirror::Class* ResolveType(dex::TypeIndex type_idx, ArtField* referrer) + REQUIRES_SHARED(Locks::mutator_lock_) + REQUIRES(!Locks::dex_lock_, !Roles::uninterruptible_); + // Look up a resolved type with the given ID from the DexFile. The ClassLoader is used to search // for the type, since it may be referenced from but not contained within the given DexFile. ObjPtr<mirror::Class> LookupResolvedType(const DexFile& dex_file, @@ -269,10 +277,6 @@ class ClassLinker { ObjPtr<mirror::DexCache> dex_cache, ObjPtr<mirror::ClassLoader> class_loader) REQUIRES_SHARED(Locks::mutator_lock_); - static ObjPtr<mirror::Class> LookupResolvedType(dex::TypeIndex type_idx, - ObjPtr<mirror::DexCache> dex_cache, - ObjPtr<mirror::ClassLoader> class_loader) - REQUIRES_SHARED(Locks::mutator_lock_); // Resolve a type with the given ID from the DexFile, storing the // result in DexCache. The ClassLoader is used to search for the @@ -366,6 +370,12 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_, !Roles::uninterruptible_); + // Resolve a method handle with a given ID from the DexFile. The + // result is not cached in the DexCache as the instance will only be + // used once in most circumstances. + mirror::MethodHandle* ResolveMethodHandle(uint32_t method_handle_idx, ArtMethod* referrer) + REQUIRES_SHARED(Locks::mutator_lock_); + // Returns true on success, false if there's an exception pending. // can_run_clinit=false allows the compiler to attempt to init a class, // given the restriction that no <clinit> execution is possible. |