summaryrefslogtreecommitdiff
path: root/runtime/mirror/art_method-inl.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-12-03 00:04:43 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-12-03 00:04:43 +0000
commit384f729a465d0ab3a76faa7ec8fa05ced82b4a85 (patch)
tree4e36277e305cb9ec7d195ef1c2386615f071ab89 /runtime/mirror/art_method-inl.h
parentc1f5f73d4790d8d72c6bebd8e31cc7f5a4bd0f84 (diff)
parenta0485607a4a4d8c683a9849f6f20902c4e1da7a4 (diff)
Merge "Move GetClassFromTypeIdx to ArtMethod."
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 85ef4e6575..c29276a238 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());