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/driver/dex_compilation_unit.cc b/compiler/driver/dex_compilation_unit.cc
index c90c37d..654eccd 100644
--- a/compiler/driver/dex_compilation_unit.cc
+++ b/compiler/driver/dex_compilation_unit.cc
@@ -31,7 +31,8 @@
                                        uint32_t method_idx,
                                        uint32_t access_flags,
                                        const VerifiedMethod* verified_method,
-                                       Handle<mirror::DexCache> dex_cache)
+                                       Handle<mirror::DexCache> dex_cache,
+                                       Handle<mirror::Class> compiling_class)
     : class_loader_(class_loader),
       class_linker_(class_linker),
       dex_file_(&dex_file),
@@ -41,7 +42,8 @@
       access_flags_(access_flags),
       verified_method_(verified_method),
       dex_cache_(dex_cache),
-      code_item_accessor_(dex_file, code_item) {}
+      code_item_accessor_(dex_file, code_item),
+      compiling_class_(compiling_class) {}
 
 const std::string& DexCompilationUnit::GetSymbol() {
   if (symbol_.empty()) {