Add compiling class to the DexCompilationUnit.
Use it to simplify HInstructionBuilder and reduce the
number of class resolution calls.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: Pixel 2 XL boots.
Change-Id: Ib4f9b4ea61235841e653a03a40755a39c7de7504
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index dd781c2..f9e9abb 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -1757,6 +1757,7 @@
caller_compilation_unit_.GetClassLoader(),
handles_);
+ Handle<mirror::Class> compiling_class = handles_->NewHandle(resolved_method->GetDeclaringClass());
DexCompilationUnit dex_compilation_unit(
class_loader,
class_linker,
@@ -1766,7 +1767,8 @@
method_index,
resolved_method->GetAccessFlags(),
/* verified_method */ nullptr,
- dex_cache);
+ dex_cache,
+ compiling_class);
InvokeType invoke_type = invoke_instruction->GetInvokeType();
if (invoke_type == kInterface) {