diff options
| author | 2011-08-20 17:38:58 -0700 | |
|---|---|---|
| committer | 2011-08-21 17:42:55 -0700 | |
| commit | c143c55718342519db5398e41dda31422cf16c79 (patch) | |
| tree | b2d80bd5dc63e0eb0bea372651de12dcaf2e7f0d /src/compiler/codegen/arm/ArmRallocUtil.cc | |
| parent | 195487cb0b11e64917df01f8d55671344db2e97f (diff) | |
Updating the compiler to use the new-world model
New compiler is integrated and passes first test (Fibonacci).
Change-Id: Ic5448ab89ebd22baa30fafc3d1300324687d1fc2
Diffstat (limited to 'src/compiler/codegen/arm/ArmRallocUtil.cc')
| -rw-r--r-- | src/compiler/codegen/arm/ArmRallocUtil.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/compiler/codegen/arm/ArmRallocUtil.cc b/src/compiler/codegen/arm/ArmRallocUtil.cc index 2fc1603b61..0a0c9bc458 100644 --- a/src/compiler/codegen/arm/ArmRallocUtil.cc +++ b/src/compiler/codegen/arm/ArmRallocUtil.cc @@ -86,7 +86,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->registersSize); + assert(origSreg < cUnit->method->num_registers_); bool fpUse = ssaRep->fpUse ? ssaRep->fpUse[i] : false; if (fp == fpUse) { counts[origSreg].count++; @@ -99,7 +99,7 @@ static void countRefs(CompilationUnit *cUnit, BasicBlock* bb, } int origSreg = DECODE_REG( oatConvertSSARegToDalvik(cUnit, ssaRep->defs[i])); - assert(origSreg < cUnit->method->registersSize); + assert(origSreg < cUnit->method->num_registers_); bool fpDef = ssaRep->fpDef ? ssaRep->fpDef[i] : false; if (fp == fpDef) { counts[origSreg].count++; @@ -131,8 +131,8 @@ static void dumpCounts(const RefCounts* arr, int size, const char* msg) */ extern void oatDoPromotion(CompilationUnit* cUnit) { - int numRegs = cUnit->method->registersSize; - int numIns = cUnit->method->insSize; + int numRegs = cUnit->method->num_registers_; + int numIns = cUnit->method->num_ins_; /* * Because ins don't have explicit definitions, we need to type @@ -140,10 +140,9 @@ extern void oatDoPromotion(CompilationUnit* cUnit) */ if (numIns > 0) { int sReg = numRegs - numIns; - const char *shorty = cUnit->method->shorty; - shorty++; // Move past return type; - while (*shorty) { - char arg = *shorty++; + const art::StringPiece& shorty = cUnit->method->GetShorty(); + for (int i = 1; i < shorty.size(); i++) { + char arg = shorty[i]; // Is it wide? if ((arg == 'D') || (arg == 'J')) { cUnit->regLocation[sReg].wide = true; |