diff options
| author | 2011-09-23 17:34:19 -0700 | |
|---|---|---|
| committer | 2011-09-23 18:34:31 -0700 | |
| commit | ed3e930109e3f01804ca32cee4afe4f2d4b3f4d8 (patch) | |
| tree | 41c3ffd3fdade2244b4cd3824c98419edecbca86 /src/compiler/codegen/Ralloc.h | |
| parent | 8060925c45cc2607ab92390d7366c6c0cfdfe4bb (diff) | |
assert to DCHECK conversion
Also replaced static function defs with a STATIC macro to make normally
hidden functions visible to DCHECK's traceback listing). Additionally,
added some portions of the new type & size inference mechanism (but not
taking advantage of them yet).
Change-Id: Ib42a08777f28ab879d0df37617e1b77e3f09ba52
Diffstat (limited to 'src/compiler/codegen/Ralloc.h')
| -rw-r--r-- | src/compiler/codegen/Ralloc.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/compiler/codegen/Ralloc.h b/src/compiler/codegen/Ralloc.h index ad19475b9b..0c3fbcaea2 100644 --- a/src/compiler/codegen/Ralloc.h +++ b/src/compiler/codegen/Ralloc.h @@ -31,7 +31,7 @@ * Must use a core register for data types narrower than word (due * to possible unaligned load/store. */ -static inline RegisterClass oatRegClassBySize(OpSize size) +STATIC inline RegisterClass oatRegClassBySize(OpSize size) { return (size == kUnsignedHalf || size == kSignedHalf || @@ -39,9 +39,9 @@ static inline RegisterClass oatRegClassBySize(OpSize size) size == kSignedByte ) ? kCoreReg : kAnyReg; } -static inline int oatS2VReg(CompilationUnit* cUnit, int sReg) +STATIC inline int oatS2VReg(CompilationUnit* cUnit, int sReg) { - assert(sReg != INVALID_SREG); + DCHECK_NE(sReg, INVALID_SREG); return DECODE_REG(oatConvertSSARegToDalvik(cUnit, sReg)); } @@ -55,20 +55,20 @@ static inline int oatS2VReg(CompilationUnit* cUnit, int sReg) * identified by the dataflow pass what it's new name is. */ -static inline int oatSRegHi(int lowSreg) { +STATIC inline int oatSRegHi(int lowSreg) { return (lowSreg == INVALID_SREG) ? INVALID_SREG : lowSreg + 1; } -static inline bool oatLiveOut(CompilationUnit* cUnit, int sReg) +STATIC inline bool oatLiveOut(CompilationUnit* cUnit, int sReg) { //For now. return true; } -static inline int oatSSASrc(MIR* mir, int num) +STATIC inline int oatSSASrc(MIR* mir, int num) { - assert(mir->ssaRep->numUses > num); + DCHECK_GT(mir->ssaRep->numUses, num); return mir->ssaRep->uses[num]; } @@ -84,6 +84,9 @@ extern RegLocation oatUpdateLoc(CompilationUnit* cUnit, extern RegLocation oatUpdateLocWide(CompilationUnit* cUnit, RegLocation loc); +extern RegLocation oatUpdateRawLoc(CompilationUnit* cUnit, + RegLocation loc); + extern void oatMarkLive(CompilationUnit* cUnit, int reg, int sReg); extern void oatMarkTemp(CompilationUnit* cUnit, int reg); |