public class SlotParamTable extends StaticTable<int[]>
Modifier and Type | Field and Description |
---|---|
private com.ibm.wala.ssa.IR |
ir |
private boolean |
isMethodRegion |
private Stmt |
stmt |
Modifier | Constructor and Description |
---|---|
private |
SlotParamTable(boolean isMethodRegion) |
|
SlotParamTable(com.ibm.wala.ssa.IR ir,
java.lang.Boolean isMethodRegion,
Stmt stmt) |
|
SlotParamTable(com.ibm.wala.ssa.IR ir,
java.lang.Boolean isMethodRegion,
Stmt stmt,
Pair<java.lang.Integer,java.lang.Integer> firstUseLastDef,
int startingBlockNumber,
int terminusBlockNumber) |
Modifier and Type | Method and Description |
---|---|
void |
filterTable(Pair<java.lang.Integer,java.lang.Integer> firstUseLastDef,
java.util.ArrayList<java.lang.Integer> allDefs,
java.util.HashSet<java.lang.Integer> allUses) |
private int[] |
getOperandSlot(com.ibm.wala.ssa.SSAPhiInstruction phi) |
java.util.HashSet |
getSlots()
Finds all unique slots in the stackSlotMap.
|
java.util.Set |
getVarsOfSlot(int slot,
java.lang.Integer firstVarId,
java.lang.Integer lastVarId)
Returns all vars that have the same stack slot entered, between boundaries.
|
boolean |
isConstant(int operand1)
Determines if a wala var is constant.
|
private void |
populateParam() |
private void |
populateSlotsForVars(int startingBlockNumber,
int terminusBlockNumber) |
void |
print()
Basic print of the table.
|
private void |
stackSlotPhiPropagation()
This tries to infer the stack slots for phi "def" vars and phi "use" vars by either figuring out the stack slots
of one "use" var and populate it to be for the phi "def" var, or the opposite,
that is the stack slot of the phi "def" was known and so it is propagated to the "use" vars
|
private boolean |
updatePhiUse(com.ibm.wala.ssa.SSAPhiInstruction phi,
int[] slots) |
getKeys, mergeTable, updateKey
add, lookup, mergeTable, remove
private com.ibm.wala.ssa.IR ir
private boolean isMethodRegion
private Stmt stmt
public SlotParamTable(com.ibm.wala.ssa.IR ir, java.lang.Boolean isMethodRegion, Stmt stmt)
public SlotParamTable(com.ibm.wala.ssa.IR ir, java.lang.Boolean isMethodRegion, Stmt stmt, Pair<java.lang.Integer,java.lang.Integer> firstUseLastDef, int startingBlockNumber, int terminusBlockNumber)
private SlotParamTable(boolean isMethodRegion)
private void populateParam()
private void populateSlotsForVars(int startingBlockNumber, int terminusBlockNumber)
public void filterTable(Pair<java.lang.Integer,java.lang.Integer> firstUseLastDef, java.util.ArrayList<java.lang.Integer> allDefs, java.util.HashSet<java.lang.Integer> allUses)
public java.util.HashSet getSlots()
public java.util.Set getVarsOfSlot(int slot, java.lang.Integer firstVarId, java.lang.Integer lastVarId)
slot
- A slot number that we wish to discover all vars attaching to it.firstVarId
- A lower bound on the var number to be discovered by this method.lastVarId
- An upper bound on the var numbers to be discovered by this method.private void stackSlotPhiPropagation()
private boolean updatePhiUse(com.ibm.wala.ssa.SSAPhiInstruction phi, int[] slots)
private int[] getOperandSlot(com.ibm.wala.ssa.SSAPhiInstruction phi)
public boolean isConstant(int operand1)