Class StackState


  • public class StackState
    extends java.lang.Object
    In immutable stack state, which may be shared between frames
    • Field Detail

      • contents

        private final java.util.List<StackEntry> contents
        The contents of the stack

        This list may be shared between frames, so it must never be modified

        The very first element represents the bottom of the stack, with the last element representing the top. Wide elements are stored as Wide, Top, with the StackEntryType.TOP on the top of the stack

      • constPool

        private final ConstPool constPool
    • Constructor Detail

      • StackState

        public StackState​(ConstPool constPool)
      • StackState

        public StackState​(java.lang.String exceptionType,
                          ConstPool constPool)
      • StackState

        private StackState​(java.util.List<StackEntry> contents,
                           ConstPool constPool)
    • Method Detail

      • isOnTop

        public boolean isOnTop​(java.lang.String descriptor)
        checks that the appropriate object type is on top of the stack
      • size

        public int size()
      • push

        public StackState push​(java.lang.String type)
        push a type on to the top of the stack
      • pop

        public StackState pop​(int no)
        pop a non-wide type from the top of the stack
      • toString

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

        public java.util.List<StackEntry> getContents()
      • constructorCall

        public StackState constructorCall​(int initializedValueStackPosition,
                                          StackEntry entry)