|
SandMark version 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.util.controlflowgraph.LiveVariable
LiveVariable encapsulates information about a variable in the local variable table.
Field Summary | |
boolean |
immutable
Denotes that changes to this live variable should not change the acutal code. |
(package private) boolean |
movable
|
(package private) int |
myVarNum
|
Constructor Summary | |
(package private) |
LiveVariable(int varNum)
Constructs a new live variable. |
Method Summary | |
void |
addDef(de.fub.bytecode.generic.InstructionHandle ih)
Adds another definition (the instruction handle for the def instruction) to the definition list for this variable. |
void |
addInterference(LiveVariable other)
Adds a fake interference between this variable and the parameter, so that calls to interferesWith will return true, regardless of the contents of their live ranges. |
(package private) void |
addRange(InterferenceGraph.RangeNode live)
Adds another node to the live range for this variable. |
void |
addUse(de.fub.bytecode.generic.InstructionHandle ih)
Adds another use (the instruction handle for the use instruction) to the use list for this variable. |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
Compares two live variables based on the order of definition (earlier defined variables first) the local variable number of parameters |
boolean |
equals(java.lang.Object o)
|
java.util.Iterator |
getDefIterator()
Returns an iterator of InstructionHandles for each definition of this variable. |
java.util.Iterator |
getUseIterator()
Returns an iterator of InstructionHandles for each use of this variable. |
int |
getVarNum()
Returns the current slot in the local variable table where this variable is assigned. |
boolean |
hasFakeInterference()
Returns true if there is a fake edge added to this variable. |
boolean |
interferesWith(LiveVariable other)
Returns true if the live ranges for these variables intersect, or if there is a fake interference added between these nodes (by the addInterference method). |
boolean |
isMovable()
Checks to see if this variable can be moved from its current slot in the local variable table. |
boolean |
isSameAs(LiveVariable other)
Returns true if these variables share any uses or defs. |
(package private) static LiveVariable |
merge(LiveVariable v1,
LiveVariable v2)
|
boolean |
removeInterference(LiveVariable other)
Removes a fake interference between this variable and the parameter, if it existed. |
void |
setMovable(boolean move)
Sets whether or not this variable can be moved from its current slot in the local variable table. |
void |
setVarNum(int index)
Changes the current slot in the local variable table where this variable is assigned and changes the bytecode where this variable is referenced. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
int myVarNum
public boolean immutable
boolean movable
Constructor Detail |
LiveVariable(int varNum)
Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
void addRange(InterferenceGraph.RangeNode live)
public void addUse(de.fub.bytecode.generic.InstructionHandle ih)
public void setMovable(boolean move)
public boolean isMovable()
public java.util.Iterator getUseIterator()
public java.util.Iterator getDefIterator()
public boolean isSameAs(LiveVariable other)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void addDef(de.fub.bytecode.generic.InstructionHandle ih)
public int getVarNum()
public void setVarNum(int index)
index
- the new local variable numberpublic java.lang.String toString()
toString
in class java.lang.Object
public void addInterference(LiveVariable other)
other
- the variable that this variable should always
appear to interfere withpublic boolean removeInterference(LiveVariable other)
public boolean hasFakeInterference()
public boolean interferesWith(LiveVariable other)
static LiveVariable merge(LiveVariable v1, LiveVariable v2)
|
SandMark version 2.1 Wed Jul 3 17:27:43 MST 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |