|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.Location
public class Location
A class for modeling variable/temporary locations, either in memory or in a register
| Constructor Summary | |
|---|---|
Location(java.lang.String reg)
Location constructor for register locations |
|
Location(java.lang.String baseReg,
int offset)
Location constructor for memory locations |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Override equals for comparing locations |
java.lang.String |
getBaseReg()
Get the base register (can only be used when location is in memory) |
int |
getOffset()
Get the offset (can only be used when location is in memory) |
java.lang.String |
getReg()
Get the register (can only be used when location is in a register) |
boolean |
isInMemory()
Is this location in memory? |
java.lang.String |
toString()
Override toString for printing purposes |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Location(java.lang.String baseReg,
int offset)
baseReg - the name of the base registeroffset - the offsetpublic Location(java.lang.String reg)
reg - the name of the register| Method Detail |
|---|
public boolean isInMemory()
public java.lang.String getBaseReg()
public int getOffset()
public java.lang.String getReg()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||