Class AbstractIntStackMachine.MachineState
- java.lang.Object
-
- com.ibm.wala.util.graph.impl.NodeWithNumber
-
- com.ibm.wala.fixpoint.AbstractVariable<AbstractIntStackMachine.MachineState>
-
- com.ibm.wala.analysis.stackMachine.AbstractIntStackMachine.MachineState
-
- All Implemented Interfaces:
IVariable<AbstractIntStackMachine.MachineState>
,INodeWithNumber
- Enclosing class:
- AbstractIntStackMachine
public class AbstractIntStackMachine.MachineState extends AbstractVariable<AbstractIntStackMachine.MachineState>
Representation of the state of the JVM stack machine at some program point.
-
-
Constructor Summary
Constructors Constructor Description MachineState(ShrikeCFG.BasicBlock bb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearStack()
void
copyState(AbstractIntStackMachine.MachineState other)
Set this variable to have the same state as another oneAbstractIntStackMachine.MachineState
duplicate()
I'm not using clone because I don't want to necessarily inherit the AbstractVariable state from the superclassShrikeCFG.BasicBlock
getBasicBlock()
int
getLocal(int i)
int[]
getLocals()
Use with care.int
getStackHeight()
Returns the stackHeight.boolean
hasValue(int val)
int
peek()
int
pop()
void
push(int i)
void
replaceValue(int from, int to)
void
setLocal(int i, int j)
set the value of local i to symbol jvoid
swap()
String
toString()
-
Methods inherited from class com.ibm.wala.fixpoint.AbstractVariable
equals, getOrderNumber, hashCode, nextHash, setOrderNumber
-
Methods inherited from class com.ibm.wala.util.graph.impl.NodeWithNumber
getGraphNodeId, setGraphNodeId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
-
-
-
-
Constructor Detail
-
MachineState
public MachineState(ShrikeCFG.BasicBlock bb)
-
-
Method Detail
-
duplicate
public AbstractIntStackMachine.MachineState duplicate()
I'm not using clone because I don't want to necessarily inherit the AbstractVariable state from the superclass
-
getBasicBlock
public ShrikeCFG.BasicBlock getBasicBlock()
-
push
public void push(int i)
-
pop
public int pop()
-
peek
public int peek()
-
swap
public void swap()
-
clearStack
public void clearStack()
-
setLocal
public void setLocal(int i, int j)
set the value of local i to symbol j- Parameters:
i
-j
-
-
getLocal
public int getLocal(int i)
- Parameters:
i
-- Returns:
- the number of the symbol corresponding to local i
-
replaceValue
public void replaceValue(int from, int to)
-
hasValue
public boolean hasValue(int val)
-
copyState
public void copyState(AbstractIntStackMachine.MachineState other)
Description copied from interface:IVariable
Set this variable to have the same state as another one
-
getStackHeight
public int getStackHeight()
Returns the stackHeight.- Returns:
- int
-
getLocals
public int[] getLocals()
Use with care.
-
-