Class FrameGenerator


  • public class FrameGenerator
    extends Object
    Generates StackMapTable frames for a method.
    • Constructor Detail

      • FrameGenerator

        public FrameGenerator​(ConstPool constPool)
        Constructs a FrameGenerator for the given constant pool.
        Parameters:
        constPool - the constant pool
    • Method Detail

      • computeFrames

        public List<StackMapFrame> computeFrames​(MethodEntry method)
        Computes the StackMapTable frames for a method.
        Parameters:
        method - The method to compute frames for
        Returns:
        List of StackMapFrame entries (all FullFrame type)
      • computeMaxStack

        public int computeMaxStack​(MethodEntry method)
        Computes the true max_stack over the method's control-flow graph.
        Parameters:
        method - the method to analyze
        Returns:
        the CFG-correct max_stack in slots (0 if the method has no code)
      • updateStackMapTable

        public void updateStackMapTable​(MethodEntry method)
        Convenience method to compute and update the StackMapTable for a method.
        Parameters:
        method - The method to update