summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/arm/ArmRallocUtil.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2011-08-26 03:29:44 -0700
committer Ian Rogers <irogers@google.com> 2011-09-02 14:48:01 -0700
commit0cfe1fb7060576d047f7f894fc0d8b87de84fcab (patch)
tree4255eae2034dcb0febe28411c50cba76189f39ae /src/compiler/codegen/arm/ArmRallocUtil.cc
parenta09576416788b916095739e43a16917e7948f3a4 (diff)
Use accessor methods for Object fields.
Ensure that Object fields are modified via accessors so that it's easy to insert barriers (make all fields within Objects private). Add validity checks to Field and Method accessors to ensure they are accessed when a Class is in a suitable state. Add validity checks to all Object accessors to check heap isn't corrupted. Remove hacked in strings from Field and Method; make type fields used the dex cache that is lazily initialized. Clean up various other TODOs and lint issues. Change-Id: Iac0afc515c01f5419874d9cdcdb9a7b45443e3fb
Diffstat (limited to 'src/compiler/codegen/arm/ArmRallocUtil.cc')
-rw-r--r--src/compiler/codegen/arm/ArmRallocUtil.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/codegen/arm/ArmRallocUtil.cc b/src/compiler/codegen/arm/ArmRallocUtil.cc
index 6223512f16..78d5267c61 100644
--- a/src/compiler/codegen/arm/ArmRallocUtil.cc
+++ b/src/compiler/codegen/arm/ArmRallocUtil.cc
@@ -94,7 +94,7 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb,
for (i=0; i< ssaRep->numUses; i++) {
int origSreg = DECODE_REG(
oatConvertSSARegToDalvik(cUnit, ssaRep->uses[i]));
- assert(origSreg < cUnit->method->num_registers_);
+ assert(origSreg < cUnit->method->NumRegisters());
bool fpUse = ssaRep->fpUse ? ssaRep->fpUse[i] : false;
if (fp == fpUse) {
counts[origSreg].count++;
@@ -107,7 +107,7 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb,
}
int origSreg = DECODE_REG(
oatConvertSSARegToDalvik(cUnit, ssaRep->defs[i]));
- assert(origSreg < cUnit->method->num_registers_);
+ assert(origSreg < cUnit->method->NumRegisters());
bool fpDef = ssaRep->fpDef ? ssaRep->fpDef[i] : false;
if (fp == fpDef) {
counts[origSreg].count++;
@@ -139,8 +139,8 @@ static void dumpCounts(const RefCounts* arr, int size, const char* msg)
*/
extern void oatDoPromotion(CompilationUnit* cUnit)
{
- int numRegs = cUnit->method->num_registers_;
- int numIns = cUnit->method->num_ins_;
+ int numRegs = cUnit->method->NumRegisters();
+ int numIns = cUnit->method->NumIns();
/*
* Because ins don't have explicit definitions, we need to type