summaryrefslogtreecommitdiffstats
path: root/runtime/mirror/art_method-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/art_method-inl.h')
-rw-r--r--runtime/mirror/art_method-inl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/mirror/art_method-inl.h b/runtime/mirror/art_method-inl.h
index 85ef4e6..c29276a 100644
--- a/runtime/mirror/art_method-inl.h
+++ b/runtime/mirror/art_method-inl.h
@@ -140,6 +140,15 @@ inline bool ArtMethod::HasSameDexCacheResolvedTypes(ArtMethod* other) {
return GetDexCacheResolvedTypes() == other->GetDexCacheResolvedTypes();
}
+inline mirror::Class* ArtMethod::GetClassFromTypeIndex(uint16_t type_idx, bool resolve) {
+ mirror::Class* type = GetDexCacheResolvedType(type_idx);
+ if (type == nullptr && resolve) {
+ type = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, this);
+ CHECK(type != nullptr || Thread::Current()->IsExceptionPending());
+ }
+ return type;
+}
+
inline uint32_t ArtMethod::GetCodeSize() {
DCHECK(!IsRuntimeMethod() && !IsProxyMethod()) << PrettyMethod(this);
const void* code = EntryPointToCodePointer(GetEntryPointFromQuickCompiledCode());