summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/MethodCodegenDriver.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-03-17 11:49:39 -0700
committer Ian Rogers <irogers@google.com> 2012-03-17 12:34:56 -0700
commit2ed3b9536ccfd7c7321cc18650820b093b22d6c9 (patch)
treec0e211414d0fed674ed2d1fbb340433b49adb57b /src/compiler/codegen/MethodCodegenDriver.cc
parente9dc4c0beae58d7d6d4cf43140c233251e06bbb7 (diff)
Implement direct apk -> boot calling
Also sharpen super calls. Change-Id: Ie4d3ab2cbf2961a06ec86762a53132f49a4ed922
Diffstat (limited to 'src/compiler/codegen/MethodCodegenDriver.cc')
-rw-r--r--src/compiler/codegen/MethodCodegenDriver.cc16
1 files changed, 10 insertions, 6 deletions
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);