Class CodeAnalyzer

java.lang.Object
javassist.bytecode.CodeAnalyzer
All Implemented Interfaces:
Opcode

class CodeAnalyzer extends Object implements Opcode
Utility for computing max_stack.
  • Field Details

  • Constructor Details

  • Method Details

    • computeMaxStack

      public int computeMaxStack() throws BadBytecode
      Throws:
      BadBytecode
    • initStack

      private void initStack(int[] stack, CodeAttribute ca)
    • visitBytecode

      private void visitBytecode(CodeIterator ci, int[] stack, int index) throws BadBytecode
      Throws:
      BadBytecode
    • processBranch

      private boolean processBranch(int opcode, CodeIterator ci, int index, int codeLength, int[] stack, int stackDepth, int[] jsrDepth) throws BadBytecode
      Throws:
      BadBytecode
    • checkTarget

      private void checkTarget(int opIndex, int target, int codeLength, int[] stack, int stackDepth) throws BadBytecode
      Throws:
      BadBytecode
    • isEnd

      private static boolean isEnd(int opcode)
    • visitInst

      private int visitInst(int op, CodeIterator ci, int index, int stack) throws BadBytecode
      Visits an instruction.
      Throws:
      BadBytecode
    • getFieldSize

      private int getFieldSize(CodeIterator ci, int index)