Refactor ArtField::GetType<>() as {Lookup,Resolve}Type().
And add no thread suspension assertion to LookupType()
as well as ArtMethod::LookupResolvedClassFromTypeIndex().
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: If1541ccb0aafeabb6d1dd5566f10afcac98a2ef1
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index 4181169..12b4d16 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -103,6 +103,7 @@
}
inline ObjPtr<mirror::Class> ArtMethod::LookupResolvedClassFromTypeIndex(dex::TypeIndex type_idx) {
+ ScopedAssertNoThreadSuspension ants(__FUNCTION__);
ObjPtr<mirror::DexCache> dex_cache = GetDexCache();
ObjPtr<mirror::Class> type = dex_cache->GetResolvedType(type_idx);
if (UNLIKELY(type == nullptr)) {