public class HeapVariable<T> extends Object
Modifier and Type | Field and Description |
---|---|
private BitVector |
definedIn
a bit vector representing the basic blocks that write to this
variable
|
private int |
number
a unique identifier for this heap variable among all heap variables
with this type.
|
private T |
type
The type of this heap variable.
|
Constructor and Description |
---|
HeapVariable(T type,
int number,
IR ir)
Create a new Heap variable of a given type, with a given number.
|
Modifier and Type | Method and Description |
---|---|
BitVector |
getDefBlocks()
Return a bit vector that represents the basic blocks that define
this heap variable.
|
T |
getHeapType()
Return the type representing this heap object.
|
int |
getNumber()
Return a number that uniquely identifies this heap variable, among
all the heap variables with the same type.
|
boolean |
isExceptionHeapType()
Is the this the exception heap type?
|
boolean |
isExposedOnEntry()
Is this heap variable exposed on procedure entry?
|
void |
registerDef(BasicBlock b)
Note that this heap variable is defined in a given basic block.
|
String |
toString()
Return a String representation of this variable
|
private final int number
private final BitVector definedIn
public HeapVariable(T type, int number, IR ir)
type
- a FieldReference or TypeReference object, naming the type of this
heapnumber
- second part of the name of this heap variableir
- the governing IRpublic int getNumber()
public T getHeapType()
public boolean isExceptionHeapType()
public BitVector getDefBlocks()
public void registerDef(BasicBlock b)
b
- a basic block that defines this heap variablepublic boolean isExposedOnEntry()
Equivalently: is the number = zero?
true
or false