From 2ed3b9536ccfd7c7321cc18650820b093b22d6c9 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Sat, 17 Mar 2012 11:49:39 -0700 Subject: Implement direct apk -> boot calling Also sharpen super calls. Change-Id: Ie4d3ab2cbf2961a06ec86762a53132f49a4ed922 --- src/compiler/codegen/MethodCodegenDriver.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/compiler/codegen/MethodCodegenDriver.cc') diff --git a/src/compiler/codegen/MethodCodegenDriver.cc b/src/compiler/codegen/MethodCodegenDriver.cc index be8f1f9d5c..64f55c6b02 100644 --- a/src/compiler/codegen/MethodCodegenDriver.cc +++ b/src/compiler/codegen/MethodCodegenDriver.cc @@ -70,10 +70,13 @@ void genInvoke(CompilationUnit* cUnit, MIR* mir, InvokeType type, bool isRange) uint32_t dexMethodIdx = dInsn->vB; int vtableIdx; + uintptr_t directCode; + uintptr_t directMethod; bool skipThis; bool fastPath = cUnit->compiler->ComputeInvokeInfo(dexMethodIdx, &mUnit, type, - vtableIdx) + vtableIdx, directCode, + directMethod) && !SLOW_INVOKE_PATH; if (type == kInterface) { nextCallInsn = fastPath ? nextInterfaceCallInsn @@ -89,8 +92,9 @@ void genInvoke(CompilationUnit* cUnit, MIR* mir, InvokeType type, bool isRange) nextCallInsn = fastPath ? nextSDCallInsn : nextStaticCallInsnSP; skipThis = false; } else if (type == kSuper) { - nextCallInsn = fastPath ? nextSuperCallInsn : nextSuperCallInsnSP; - skipThis = fastPath; + DCHECK(!fastPath); // Fast path is a direct call. + nextCallInsn = nextSuperCallInsnSP; + skipThis = false; } else { DCHECK_EQ(type, kVirtual); nextCallInsn = fastPath ? nextVCallInsn : nextVCallInsnSP; @@ -99,16 +103,16 @@ void genInvoke(CompilationUnit* cUnit, MIR* mir, InvokeType type, bool isRange) if (!isRange) { callState = genDalvikArgsNoRange(cUnit, mir, dInsn, callState, pNullCk, nextCallInsn, dexMethodIdx, - vtableIdx, skipThis); + vtableIdx, directCode, directMethod, skipThis); } else { callState = genDalvikArgsRange(cUnit, mir, dInsn, callState, pNullCk, nextCallInsn, dexMethodIdx, vtableIdx, - skipThis); + directCode, directMethod, skipThis); } // Finish up any of the call sequence not interleaved in arg loading while (callState >= 0) { callState = nextCallInsn(cUnit, mir, callState, dexMethodIdx, - vtableIdx); + vtableIdx, directCode, directMethod); } if (DISPLAY_MISSING_TARGETS) { genShowTarget(cUnit); -- cgit v1.2.3-59-g8ed1b