diff options
author | Ian Rogers <irogers@google.com> | 2014-05-06 16:20:11 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-05-06 16:23:19 -0700 |
commit | 72d32629303f8f39362a4099481f48646aed042f (patch) | |
tree | 0ff613168c3bf2e12799594c9211f9a1694119e2 /compiler/optimizing/optimizing_compiler.cc | |
parent | 47ebd77a6d249403a34d242908749b7446da2a82 (diff) | |
download | art-72d32629303f8f39362a4099481f48646aed042f.zip art-72d32629303f8f39362a4099481f48646aed042f.tar.gz art-72d32629303f8f39362a4099481f48646aed042f.tar.bz2 |
Give Compiler a back reference to the driver.
The compiler driver is a single object delegating work to the compiler, rather
than passing it through to every Compiler call make it a member of Compiler so
that it maybe queried. This simplifies the Compiler API and makes the
relationship to CompilerDriver more explicit.
Remove reference arguments that contravene code style.
Change-Id: Iba47f2e3cbda679a7ec7588f26188d77643aa2c6
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 9438890..b2c3c2d 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -50,8 +50,7 @@ class CodeVectorAllocator FINAL : public CodeAllocator { }; -CompiledMethod* OptimizingCompiler::TryCompile(CompilerDriver& driver, - const DexFile::CodeItem* code_item, +CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_item, uint32_t access_flags, InvokeType invoke_type, uint16_t class_def_idx, @@ -60,7 +59,8 @@ CompiledMethod* OptimizingCompiler::TryCompile(CompilerDriver& driver, const DexFile& dex_file) const { DexCompilationUnit dex_compilation_unit( nullptr, class_loader, art::Runtime::Current()->GetClassLinker(), dex_file, code_item, - class_def_idx, method_idx, access_flags, driver.GetVerifiedMethod(&dex_file, method_idx)); + class_def_idx, method_idx, access_flags, + GetCompilerDriver()->GetVerifiedMethod(&dex_file, method_idx)); // For testing purposes, we put a special marker on method names that should be compiled // with this compiler. This makes sure we're not regressing. @@ -77,7 +77,7 @@ CompiledMethod* OptimizingCompiler::TryCompile(CompilerDriver& driver, return nullptr; } - InstructionSet instruction_set = driver.GetInstructionSet(); + InstructionSet instruction_set = GetCompilerDriver()->GetInstructionSet(); // The optimizing compiler currently does not have a Thumb2 assembler. if (instruction_set == kThumb2) { instruction_set = kArm; @@ -104,7 +104,7 @@ CompiledMethod* OptimizingCompiler::TryCompile(CompilerDriver& driver, graph->BuildDominatorTree(); graph->TransformToSSA(); - return new CompiledMethod(driver, + return new CompiledMethod(GetCompilerDriver(), instruction_set, allocator.GetMemory(), codegen->GetFrameSize(), |