diff options
| author | 2012-02-29 01:26:58 +0800 | |
|---|---|---|
| committer | 2012-02-29 11:53:18 -0800 | |
| commit | 4dd96f56909ec35c83a3d468b0e47769988c1a1d (patch) | |
| tree | 99fde7aab07e550864860825b7732a37fce81d81 /src/compiler_llvm/compiler_llvm.cc | |
| parent | 45619fcc01fb6db1ac9481a91608eb46f90829e4 (diff) | |
Extract method-related information from CompilationUnit.
Extract method-related information, such as class_loader,
class_linker, dex_file, dex_cache, code_item, method_idx,
and access_flags from art::CompilationUnit, so that we
can use them in 2 different code generators.
Change-Id: I20631cc73b6f01e9646a983156f3fcb066d732db
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
| -rw-r--r-- | src/compiler_llvm/compiler_llvm.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc index 038e826a09..6099841a49 100644 --- a/src/compiler_llvm/compiler_llvm.cc +++ b/src/compiler_llvm/compiler_llvm.cc @@ -19,6 +19,7 @@ #include "compiler.h" #include "ir_builder.h" #include "method_compiler.h" +#include "oat_compilation_unit.h" #include "upcall_compiler.h" #include <llvm/ADT/OwningPtr.h> @@ -81,22 +82,11 @@ void CompilerLLVM::WriteBitcodeToFile(std::string const &filepath) { } -CompiledMethod* -CompilerLLVM::CompileDexMethod(DexFile::CodeItem const* code_item, - uint32_t access_flags, - uint32_t method_idx, - ClassLoader const* class_loader, - DexFile const& dex_file) { - +CompiledMethod* CompilerLLVM::CompileDexMethod(OatCompilationUnit* oat_compilation_unit) { MutexLock GUARD(compiler_lock_); - ClassLinker *class_linker = Runtime::Current()->GetClassLinker(); - DexCache *dex_cache = class_linker->FindDexCache(dex_file); - UniquePtr<MethodCompiler> method_compiler( - new MethodCompiler(insn_set_, compiler_, class_linker, class_loader, - &dex_file, dex_cache, code_item, method_idx, - access_flags)); + new MethodCompiler(insn_set_, compiler_, oat_compilation_unit)); return method_compiler->Compile(); } |