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/codegen/MethodCodegenDriver.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/codegen/MethodCodegenDriver.cc')
| -rw-r--r-- | src/compiler/codegen/MethodCodegenDriver.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/codegen/MethodCodegenDriver.cc b/src/compiler/codegen/MethodCodegenDriver.cc index 72b3d6e297..ce8cfdaa94 100644 --- a/src/compiler/codegen/MethodCodegenDriver.cc +++ b/src/compiler/codegen/MethodCodegenDriver.cc @@ -53,11 +53,15 @@ STATIC void genInvoke(CompilationUnit* cUnit, MIR* mir, // 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) { |