From 4dd96f56909ec35c83a3d468b0e47769988c1a1d Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Wed, 29 Feb 2012 01:26:58 +0800 Subject: 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 --- src/compiler/codegen/MethodCodegenDriver.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/compiler/codegen/MethodCodegenDriver.cc') 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) { -- cgit v1.2.3-59-g8ed1b