类 JSRInlinerAdapter

所有已实现的接口:
Opcodes

public class JSRInlinerAdapter extends MethodNode implements Opcodes
A MethodVisitor that removes JSR instructions and inlines the referenced subroutines. Explanation of how it works TODO
作者:
Niko Matsakis
  • 构造器详细资料

    • JSRInlinerAdapter

      public JSRInlinerAdapter(MethodVisitor mv, int access, String name, String desc, String signature, String[] exceptions)
      Creates a new JSRInliner. Subclasses must not use this constructor. Instead, they must use the JSRInlinerAdapter(int, MethodVisitor, int, String, String, String, String[]) version.
      参数:
      mv - the MethodVisitor to send the resulting inlined method code to (use null for none).
      access - the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.
      name - the method's className.
      desc - the method's descriptor (see Type).
      signature - the method's signature. May be null.
      exceptions - the internal names of the method's exception classes (see getInternalName). May be null.
      抛出:
      IllegalStateException - If a subclass calls this constructor.
    • JSRInlinerAdapter

      protected JSRInlinerAdapter(int api, MethodVisitor mv, int access, String name, String desc, String signature, String[] exceptions)
      Creates a new JSRInliner.
      参数:
      api - the ASM API version implemented by this visitor. Must be one of Opcodes.ASM4 or Opcodes.ASM5.
      mv - the MethodVisitor to send the resulting inlined method code to (use null for none).
      access - the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.
      name - the method's className.
      desc - the method's descriptor (see Type).
      signature - the method's signature. May be null.
      exceptions - the internal names of the method's exception classes (see getInternalName). May be null.
  • 方法详细资料

    • visitJumpInsn

      public void visitJumpInsn(int opcode, Label lbl)
      Detects a JSR instruction and sets a flag to indicate we will need to do inlining.
      覆盖:
      visitJumpInsn 在类中 MethodNode
      参数:
      opcode - the opcode of the type instruction to be visited. This opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.
      lbl - the operand of the instruction to be visited. This operand is a label that designates the instruction to which the jump instruction may jump.
    • visitEnd

      public void visitEnd()
      If any JSRs were seen, triggers the inlining process. Otherwise, forwards the byte codes untouched.
      覆盖:
      visitEnd 在类中 MethodNode