Move HandleCache to HGraph.
This avoids passing the `VariableSizedHandleScope*` argument
around and eliminates HGraph::inexact_object_rti_ and its
initialization. The latter shall allow running Optimizing
gtests that do not require type information without creating
a Runtime in future. (To be implemented in a separate CL.)
Test: m test-art-host-gtest
Test: testrunner.py --host --optmizing
Test: aosp_taimen-userdebug boots.
Change-Id: I36fe9bc556c6d610d644c8c14cc74c9985a14d64
diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h
index 95d3315..04f2a22 100644
--- a/compiler/optimizing/instruction_builder.h
+++ b/compiler/optimizing/instruction_builder.h
@@ -41,7 +41,6 @@
class OptimizingCompilerStats;
class ScopedObjectAccess;
class SsaBuilder;
-class VariableSizedHandleScope;
namespace mirror {
class Class;
@@ -61,7 +60,6 @@
CodeGenerator* code_generator,
ArrayRef<const uint8_t> interpreter_metadata,
OptimizingCompilerStats* compiler_stats,
- VariableSizedHandleScope* handles,
ScopedArenaAllocator* local_allocator);
bool Build();
@@ -301,7 +299,6 @@
ArenaAllocator* const allocator_;
HGraph* const graph_;
- VariableSizedHandleScope* const handles_;
// The dex file where the method being compiled is, and the bytecode data.
const DexFile* const dex_file_;
@@ -343,7 +340,7 @@
ScopedArenaVector<HBasicBlock*> loop_headers_;
// Cached resolved types for the current compilation unit's DexFile.
- // Handle<>s reference entries in the `handles_`.
+ // Handle<>s reference entries in the `graph_->GetHandleCache()`.
ScopedArenaSafeMap<dex::TypeIndex, Handle<mirror::Class>> class_cache_;
static constexpr int kDefaultNumberOfLoops = 2;