Class 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 Details

  • Method Details

    • 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
    • getLocal

      public int getLocal(int 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)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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.