Class StackFrame


  • public class StackFrame
    extends java.lang.Object
    Represents a stack frame in the virtual machine. Holds the state of the local variable array and the stack
    Author:
    Stuart Douglas
    • Method Detail

      • getStackState

        public StackState getStackState()
      • push

        public StackFrame push​(java.lang.String type)
        push an operand of the given type onto the stack

        If the entry is wide then a corresponding TOP type will be created

      • push

        public StackFrame push​(StackEntry entry)
        push an operand of the given type onto the stack.

        If the entry is wide then a corresponding TOP type will be created

      • aconstNull

        public StackFrame aconstNull()
        pushes a null type onto the stack
        Returns:
      • pop

        public StackFrame pop()
        pops an operand from the stack
      • pop2

        public StackFrame pop2()
        pops 2 operands from the stack
      • pop3

        public StackFrame pop3()
        pops 3 operands from the stack
      • pop4

        public StackFrame pop4()
        pops 4 operands from the stack
      • replace

        public StackFrame replace​(java.lang.String type)
        replace the operand at the top of the stack with the given operand
      • store

        public StackFrame store​(int no)
        Store the variable on top of the stack into a local variable, poping the variable from the stack. Wide types are handled automatically
      • pop2push1

        public StackFrame pop2push1​(java.lang.String type)
        remote the top two operands and replace them with an different operand
      • pop4push1

        public StackFrame pop4push1​(java.lang.String type)
        remote the top two operands and replace them with an different operand
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • constructorCall

        public StackFrame constructorCall​(int initializedValueStackPosition)
        marks the value in potition initializedValueStackPosition as initialized. This also pops this value and everything above it