Support unresolved methods in Optimizing
Change-Id: If2da02b50d2fa668cd58f134a005f1752e7746b1
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 12fd1c3..039029a 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -173,6 +173,10 @@
}
bool HInliner::TryInline(HInvoke* invoke_instruction) {
+ if (invoke_instruction->IsInvokeUnresolved()) {
+ return false; // Don't bother to move further if we know the method is unresolved.
+ }
+
uint32_t method_index = invoke_instruction->GetDexMethodIndex();
ScopedObjectAccess soa(Thread::Current());
const DexFile& caller_dex_file = *caller_compilation_unit_.GetDexFile();
@@ -194,6 +198,7 @@
}
if (resolved_method == nullptr) {
+ // TODO: Can this still happen?
// Method cannot be resolved if it is in another dex file we do not have access to.
VLOG(compiler) << "Method cannot be resolved " << PrettyMethod(method_index, caller_dex_file);
return false;