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/codegen/MethodCodegenDriver.cc b/src/compiler/codegen/MethodCodegenDriver.cc
index 72b3d6e..ce8cfda 100644
--- a/src/compiler/codegen/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/MethodCodegenDriver.cc
@@ -53,11 +53,15 @@
     // Explicit register usage
     oatLockCallTemps(cUnit);
 
+    OatCompilationUnit mUnit(cUnit->class_loader, cUnit->class_linker,
+                             *cUnit->dex_file, *cUnit->dex_cache, cUnit->code_item,
+                             cUnit->method_idx, cUnit->access_flags);
+
     uint32_t dexMethodIdx = dInsn->vB;
     int vtableIdx;
     bool skipThis;
     bool fastPath =
-        cUnit->compiler->ComputeInvokeInfo(dexMethodIdx, cUnit, type,
+        cUnit->compiler->ComputeInvokeInfo(dexMethodIdx, &mUnit, type,
                                            vtableIdx)
         && !SLOW_INVOKE_PATH;
     if (type == kInterface) {