From be726b5fb9fa19e9731faa6cacd747efbde9d5b9 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 4 May 2023 08:36:04 +0000 Subject: Reland "Support FastVerify with speed-profile." This reverts commit 4297f22d902cf156e14c330147215d5f2fa9bd7f. Bug: 279728780 Reason for revert: Resolve classes in inliner. Change-Id: I4f93ac5d195eb2f473ec50fe7cc70881dcddee6f --- compiler/optimizing/inliner.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/inliner.cc') diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 443392ba28..59d6c7f66d 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -702,12 +702,14 @@ HInliner::InlineCacheType HInliner::GetInlineCacheAOT( // Walk over the class descriptors and look up the actual classes. // If we cannot find a type we return kInlineCacheMissingTypes. ClassLinker* class_linker = caller_compilation_unit_.GetClassLinker(); + Thread* self = Thread::Current(); for (const dex::TypeIndex& type_index : dex_pc_data.classes) { const DexFile* dex_file = caller_compilation_unit_.GetDexFile(); const char* descriptor = pci->GetTypeDescriptor(dex_file, type_index); - ObjPtr class_loader = caller_compilation_unit_.GetClassLoader().Get(); - ObjPtr clazz = class_linker->LookupResolvedType(descriptor, class_loader); + ObjPtr clazz = + class_linker->FindClass(self, descriptor, caller_compilation_unit_.GetClassLoader()); if (clazz == nullptr) { + self->ClearException(); // Clean up the exception left by type resolution. VLOG(compiler) << "Could not find class from inline cache in AOT mode " << invoke_instruction->GetMethodReference().PrettyMethod() << " : " -- cgit v1.2.3-59-g8ed1b