summaryrefslogtreecommitdiffstats
path: root/vm/compiler
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2011-05-03 17:59:35 -0700
committerCarl Shapiro <cshapiro@google.com>2011-05-03 18:09:17 -0700
commita62c3a0ab3fcdde37f47d16e9699a935ae7a8e88 (patch)
treeb23da5546e400facfa36b3dec6daac8c30d3a537 /vm/compiler
parent00c88766d7425c7923187c18a8c7e91d32807a97 (diff)
downloadandroid_dalvik-a62c3a0ab3fcdde37f47d16e9699a935ae7a8e88.tar.gz
android_dalvik-a62c3a0ab3fcdde37f47d16e9699a935ae7a8e88.tar.bz2
android_dalvik-a62c3a0ab3fcdde37f47d16e9699a935ae7a8e88.zip
Establish a subclass relationship between ArrayObject and Object.
Change-Id: I9f9fe52bd4ceebb6dde48251a89190ba6bb00ce4
Diffstat (limited to 'vm/compiler')
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.cpp20
-rw-r--r--vm/compiler/codegen/arm/armv5te/ArchVariant.cpp6
-rw-r--r--vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp6
-rw-r--r--vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp6
-rw-r--r--vm/compiler/codegen/x86/ia32/ArchVariant.cpp6
5 files changed, 22 insertions, 22 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp
index d170c8b4c..1a8ac4203 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/CodegenDriver.cpp
@@ -404,8 +404,8 @@ static void genArrayGet(CompilationUnit *cUnit, MIR *mir, OpSize size,
RegLocation rlDest, int scale)
{
RegisterClass regClass = dvmCompilerRegClassBySize(size);
- int lenOffset = offsetof(ArrayObject, length);
- int dataOffset = offsetof(ArrayObject, contents);
+ int lenOffset = OFFSETOF_MEMBER(ArrayObject, length);
+ int dataOffset = OFFSETOF_MEMBER(ArrayObject, contents);
RegLocation rlResult;
rlArray = loadValue(cUnit, rlArray, kCoreReg);
rlIndex = loadValue(cUnit, rlIndex, kCoreReg);
@@ -473,8 +473,8 @@ static void genArrayPut(CompilationUnit *cUnit, MIR *mir, OpSize size,
RegLocation rlSrc, int scale)
{
RegisterClass regClass = dvmCompilerRegClassBySize(size);
- int lenOffset = offsetof(ArrayObject, length);
- int dataOffset = offsetof(ArrayObject, contents);
+ int lenOffset = OFFSETOF_MEMBER(ArrayObject, length);
+ int dataOffset = OFFSETOF_MEMBER(ArrayObject, contents);
int regPtr;
rlArray = loadValue(cUnit, rlArray, kCoreReg);
@@ -547,8 +547,8 @@ static void genArrayObjectPut(CompilationUnit *cUnit, MIR *mir,
RegLocation rlArray, RegLocation rlIndex,
RegLocation rlSrc, int scale)
{
- int lenOffset = offsetof(ArrayObject, length);
- int dataOffset = offsetof(ArrayObject, contents);
+ int lenOffset = OFFSETOF_MEMBER(ArrayObject, length);
+ int dataOffset = OFFSETOF_MEMBER(ArrayObject, contents);
dvmCompilerFlushAllRegs(cUnit);
@@ -2076,7 +2076,7 @@ static bool handleFmt12x(CompilationUnit *cUnit, MIR *mir)
storeValue(cUnit, rlDest, rlResult);
break;
case OP_ARRAY_LENGTH: {
- int lenOffset = offsetof(ArrayObject, length);
+ int lenOffset = OFFSETOF_MEMBER(ArrayObject, length);
rlSrc = loadValue(cUnit, rlSrc, kCoreReg);
genNullCheck(cUnit, rlSrc.sRegLow, rlSrc.lowReg,
mir->offset, NULL);
@@ -3576,7 +3576,7 @@ static bool genInlinedStringIsEmpty(CompilationUnit *cUnit, MIR *mir)
static bool genInlinedStringCharAt(CompilationUnit *cUnit, MIR *mir)
{
- int contents = offsetof(ArrayObject, contents);
+ int contents = OFFSETOF_MEMBER(ArrayObject, contents);
RegLocation rlObj = dvmCompilerGetSrc(cUnit, mir, 0);
RegLocation rlIdx = dvmCompilerGetSrc(cUnit, mir, 1);
RegLocation rlDest = inlinedTarget(cUnit, mir, false);
@@ -3939,7 +3939,7 @@ static void genHoistedChecksForCountUpLoop(CompilationUnit *cUnit, MIR *mir)
* ssa name.
*/
DecodedInstruction *dInsn = &mir->dalvikInsn;
- const int lenOffset = offsetof(ArrayObject, length);
+ const int lenOffset = OFFSETOF_MEMBER(ArrayObject, length);
const int maxC = dInsn->arg[0];
int regLength;
RegLocation rlArray = cUnit->regLocation[mir->dalvikInsn.vA];
@@ -3986,7 +3986,7 @@ static void genHoistedChecksForCountUpLoop(CompilationUnit *cUnit, MIR *mir)
static void genHoistedChecksForCountDownLoop(CompilationUnit *cUnit, MIR *mir)
{
DecodedInstruction *dInsn = &mir->dalvikInsn;
- const int lenOffset = offsetof(ArrayObject, length);
+ const int lenOffset = OFFSETOF_MEMBER(ArrayObject, length);
const int regLength = dvmCompilerAllocTemp(cUnit);
const int maxC = dInsn->arg[0];
RegLocation rlArray = cUnit->regLocation[mir->dalvikInsn.vA];
diff --git a/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp b/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
index 57a8c8a1d..5b2e1bf10 100644
--- a/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
@@ -63,9 +63,9 @@ bool dvmCompilerArchVariantInit(void)
/* Codegen-specific assumptions */
assert(offsetof(ClassObject, vtable) < 128 &&
(offsetof(ClassObject, vtable) & 0x3) == 0);
- assert(offsetof(ArrayObject, length) < 128 &&
- (offsetof(ArrayObject, length) & 0x3) == 0);
- assert(offsetof(ArrayObject, contents) < 256);
+ assert(OFFSETOF_MEMBER(ArrayObject, length) < 128 &&
+ (OFFSETOF_MEMBER(ArrayObject, length) & 0x3) == 0);
+ assert(OFFSETOF_MEMBER(ArrayObject, contents) < 256);
/* Up to 5 args are pushed on top of FP - sizeofStackSaveArea */
assert(sizeof(StackSaveArea) < 236);
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
index 59d7c95cd..6234747b2 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
@@ -58,9 +58,9 @@ bool dvmCompilerArchVariantInit(void)
/* Codegen-specific assumptions */
assert(offsetof(ClassObject, vtable) < 128 &&
(offsetof(ClassObject, vtable) & 0x3) == 0);
- assert(offsetof(ArrayObject, length) < 128 &&
- (offsetof(ArrayObject, length) & 0x3) == 0);
- assert(offsetof(ArrayObject, contents) < 256);
+ assert(OFFSETOF_MEMBER(ArrayObject, length) < 128 &&
+ (OFFSETOF_MEMBER(ArrayObject, length) & 0x3) == 0);
+ assert(OFFSETOF_MEMBER(ArrayObject, contents) < 256);
/* Up to 5 args are pushed on top of FP - sizeofStackSaveArea */
assert(sizeof(StackSaveArea) < 236);
diff --git a/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp b/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
index 245ff78c8..d68d150da 100644
--- a/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
@@ -59,9 +59,9 @@ bool dvmCompilerArchVariantInit(void)
/* Codegen-specific assumptions */
assert(offsetof(ClassObject, vtable) < 128 &&
(offsetof(ClassObject, vtable) & 0x3) == 0);
- assert(offsetof(ArrayObject, length) < 128 &&
- (offsetof(ArrayObject, length) & 0x3) == 0);
- assert(offsetof(ArrayObject, contents) < 256);
+ assert(OFFSETOF_MEMBER(ArrayObject, length) < 128 &&
+ (OFFSETOF_MEMBER(ArrayObject, length) & 0x3) == 0);
+ assert(OFFSETOF_MEMBER(ArrayObject, contents) < 256);
/* Up to 5 args are pushed on top of FP - sizeofStackSaveArea */
assert(sizeof(StackSaveArea) < 236);
diff --git a/vm/compiler/codegen/x86/ia32/ArchVariant.cpp b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
index 4dd528ead..6992c167a 100644
--- a/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
+++ b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
@@ -63,9 +63,9 @@ bool dvmCompilerArchVariantInit(void)
/* Codegen-specific assumptions */
assert(offsetof(ClassObject, vtable) < 128 &&
(offsetof(ClassObject, vtable) & 0x3) == 0);
- assert(offsetof(ArrayObject, length) < 128 &&
- (offsetof(ArrayObject, length) & 0x3) == 0);
- assert(offsetof(ArrayObject, contents) < 256);
+ assert(OFFSETOF_MEMBER(ArrayObject, length) < 128 &&
+ (OFFSETOF_MEMBER(ArrayObject, length) & 0x3) == 0);
+ assert(OFFSETOF_MEMBER(ArrayObject, contents) < 256);
/* Up to 5 args are pushed on top of FP - sizeofStackSaveArea */
assert(sizeof(StackSaveArea) < 236);