summaryrefslogtreecommitdiff
path: root/src/compiler/codegen
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-09-21 21:04:28 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2012-09-21 21:04:28 -0700
commita2c0ba0fed90db9ad8836b87f7201b8f90cee1ea (patch)
tree2ba0727e1312aa2748b7b8be0f610453f3840676 /src/compiler/codegen
parent000d724207b4ff32fcbc9744da76d2f594675eed (diff)
parent66f19258f9728d4ffe026074d8fd429d639802fa (diff)
Merge "Change dex cache to be java object instead of array, add pointer to dex file in dex cache." into dalvik-dev
Diffstat (limited to 'src/compiler/codegen')
-rw-r--r--src/compiler/codegen/GenCommon.cc18
-rw-r--r--src/compiler/codegen/GenInvoke.cc6
-rw-r--r--src/compiler/codegen/MethodCodegenDriver.cc2
3 files changed, 13 insertions, 13 deletions
diff --git a/src/compiler/codegen/GenCommon.cc b/src/compiler/codegen/GenCommon.cc
index 55931517c8..99a76da007 100644
--- a/src/compiler/codegen/GenCommon.cc
+++ b/src/compiler/codegen/GenCommon.cc
@@ -698,7 +698,7 @@ void genSput(CompilationUnit* cUnit, uint32_t fieldIdx, RegLocation rlSrc,
RegLocation rlMethod = loadCurrMethod(cUnit);
rBase = oatAllocTemp(cUnit);
loadWordDisp(cUnit, rlMethod.lowReg,
- Method::DeclaringClassOffset().Int32Value(), rBase);
+ AbstractMethod::DeclaringClassOffset().Int32Value(), rBase);
if (oatIsTemp(cUnit, rlMethod.lowReg)) {
oatFreeTemp(cUnit, rlMethod.lowReg);
}
@@ -716,7 +716,7 @@ void genSput(CompilationUnit* cUnit, uint32_t fieldIdx, RegLocation rlSrc,
rBase = rARG0;
oatLockTemp(cUnit, rBase);
loadWordDisp(cUnit, rMethod,
- Method::DexCacheInitializedStaticStorageOffset().Int32Value(),
+ AbstractMethod::DexCacheInitializedStaticStorageOffset().Int32Value(),
rBase);
loadWordDisp(cUnit, rBase,
Array::DataOffset(sizeof(Object*)).Int32Value() +
@@ -793,7 +793,7 @@ void genSget(CompilationUnit* cUnit, uint32_t fieldIdx, RegLocation rlDest,
RegLocation rlMethod = loadCurrMethod(cUnit);
rBase = oatAllocTemp(cUnit);
loadWordDisp(cUnit, rlMethod.lowReg,
- Method::DeclaringClassOffset().Int32Value(), rBase);
+ AbstractMethod::DeclaringClassOffset().Int32Value(), rBase);
} else {
// Medium path, static storage base in a different class which
// requires checks that the other class is initialized
@@ -808,7 +808,7 @@ void genSget(CompilationUnit* cUnit, uint32_t fieldIdx, RegLocation rlDest,
rBase = rARG0;
oatLockTemp(cUnit, rBase);
loadWordDisp(cUnit, rMethod,
- Method::DexCacheInitializedStaticStorageOffset().Int32Value(),
+ AbstractMethod::DexCacheInitializedStaticStorageOffset().Int32Value(),
rBase);
loadWordDisp(cUnit, rBase,
Array::DataOffset(sizeof(Object*)).Int32Value() +
@@ -1142,7 +1142,7 @@ void genConstClass(CompilationUnit* cUnit, uint32_t type_idx,
} else {
// We're don't need access checks, load type from dex cache
int32_t dex_cache_offset =
- Method::DexCacheResolvedTypesOffset().Int32Value();
+ AbstractMethod::DexCacheResolvedTypesOffset().Int32Value();
loadWordDisp(cUnit, rlMethod.lowReg, dex_cache_offset, resReg);
int32_t offset_of_type =
Array::DataOffset(sizeof(Class*)).Int32Value() + (sizeof(Class*)
@@ -1197,7 +1197,7 @@ void genConstString(CompilationUnit* cUnit, uint32_t string_idx,
oatLockCallTemps(cUnit); // Using explicit registers
loadCurrMethodDirect(cUnit, rARG2);
loadWordDisp(cUnit, rARG2,
- Method::DexCacheStringsOffset().Int32Value(), rARG0);
+ AbstractMethod::DexCacheStringsOffset().Int32Value(), rARG0);
// Might call out to helper, which will return resolved string in rRET0
#if !defined(TARGET_X86)
int rTgt = loadHelper(cUnit, ENTRYPOINT_OFFSET(pResolveStringFromCode));
@@ -1233,7 +1233,7 @@ void genConstString(CompilationUnit* cUnit, uint32_t string_idx,
int resReg = oatAllocTemp(cUnit);
RegLocation rlResult = oatEvalLoc(cUnit, rlDest, kCoreReg, true);
loadWordDisp(cUnit, rlMethod.lowReg,
- Method::DexCacheStringsOffset().Int32Value(), resReg);
+ AbstractMethod::DexCacheStringsOffset().Int32Value(), resReg);
loadWordDisp(cUnit, resReg, offset_of_string, rlResult.lowReg);
storeValue(cUnit, rlDest, rlResult);
}
@@ -1287,7 +1287,7 @@ void genInstanceof(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlDest
// Load dex cache entry into classReg (rARG2)
loadValueDirectFixed(cUnit, rlSrc, rARG0); // rARG0 <= ref
loadWordDisp(cUnit, rARG1,
- Method::DexCacheResolvedTypesOffset().Int32Value(), classReg);
+ AbstractMethod::DexCacheResolvedTypesOffset().Int32Value(), classReg);
int32_t offset_of_type =
Array::DataOffset(sizeof(Class*)).Int32Value() + (sizeof(Class*)
* type_idx);
@@ -1369,7 +1369,7 @@ void genCheckCast(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlSrc)
} else {
// Load dex cache entry into classReg (rARG2)
loadWordDisp(cUnit, rARG1,
- Method::DexCacheResolvedTypesOffset().Int32Value(), classReg);
+ AbstractMethod::DexCacheResolvedTypesOffset().Int32Value(), classReg);
int32_t offset_of_type =
Array::DataOffset(sizeof(Class*)).Int32Value() +
(sizeof(Class*) * type_idx);
diff --git a/src/compiler/codegen/GenInvoke.cc b/src/compiler/codegen/GenInvoke.cc
index ba580f8b88..3cc7c93511 100644
--- a/src/compiler/codegen/GenInvoke.cc
+++ b/src/compiler/codegen/GenInvoke.cc
@@ -193,7 +193,7 @@ int nextSDCallInsn(CompilationUnit* cUnit, CallInfo* info,
break;
case 1: // Get method->dex_cache_resolved_methods_
loadWordDisp(cUnit, rARG0,
- Method::DexCacheResolvedMethodsOffset().Int32Value(),
+ AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(),
rARG0);
// Set up direct code if known.
if (directCode != 0) {
@@ -224,7 +224,7 @@ int nextSDCallInsn(CompilationUnit* cUnit, CallInfo* info,
#if !defined(TARGET_X86)
case 3: // Grab the code from the method*
if (directCode == 0) {
- loadWordDisp(cUnit, rARG0, Method::GetCodeOffset().Int32Value(),
+ loadWordDisp(cUnit, rARG0, AbstractMethod::GetCodeOffset().Int32Value(),
rINVOKE_TGT);
}
break;
@@ -273,7 +273,7 @@ int nextVCallInsn(CompilationUnit* cUnit, CallInfo* info,
break;
#if !defined(TARGET_X86)
case 4: // Get the compiled code address [uses rARG0, sets rINVOKE_TGT]
- loadWordDisp(cUnit, rARG0, Method::GetCodeOffset().Int32Value(),
+ loadWordDisp(cUnit, rARG0, AbstractMethod::GetCodeOffset().Int32Value(),
rINVOKE_TGT);
break;
#endif
diff --git a/src/compiler/codegen/MethodCodegenDriver.cc b/src/compiler/codegen/MethodCodegenDriver.cc
index 7d612b04a1..8269f8bb85 100644
--- a/src/compiler/codegen/MethodCodegenDriver.cc
+++ b/src/compiler/codegen/MethodCodegenDriver.cc
@@ -129,7 +129,7 @@ void genInvoke(CompilationUnit* cUnit, CallInfo* info)
callInst = opReg(cUnit, kOpBlx, rINVOKE_TGT);
#else
if (fastPath && info->type != kInterface) {
- callInst = opMem(cUnit, kOpBlx, rARG0, Method::GetCodeOffset().Int32Value());
+ callInst = opMem(cUnit, kOpBlx, rARG0, AbstractMethod::GetCodeOffset().Int32Value());
} else {
int trampoline = 0;
switch (info->type) {