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
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index 038e826..6099841 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 @@
 }
 
 
-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();
 }