类 JSRInlinerAdapter.Instantiation

java.lang.Object
java.util.AbstractMap<LabelNode,LabelNode>
cn.taketoday.bytecode.commons.JSRInlinerAdapter.Instantiation
所有已实现的接口:
Map<LabelNode,LabelNode>
封闭类:
JSRInlinerAdapter

private class JSRInlinerAdapter.Instantiation extends AbstractMap<LabelNode,LabelNode>
An instantiation of a subroutine.
  • 字段详细资料

    • parent

      The instantiation from which this one was created (or null for the instantiation of the main "subroutine").
    • subroutineInsns

      final BitSet subroutineInsns
      The original instructions that belong to the subroutine which is instantiated. Bit i is set iff instruction at index i belongs to this subroutine.
    • clonedLabels

      final HashMap<LabelNode,LabelNode> clonedLabels
      A map from labels from the original code to labels pointing at code specific to this instantiation, for use in remapping try/catch blocks, as well as jumps.

      Note that in the presence of instructions belonging to several subroutines, we map the target label of a GOTO to the label used by the oldest instantiation (parent instantiations are older than their children). This avoids code duplication during inlining in most cases.

    • returnLabel

      final LabelNode returnLabel
      The return label for this instantiation, to which all original returns will be mapped.
  • 构造器详细资料

  • 方法详细资料

    • findOwner

      JSRInlinerAdapter.Instantiation findOwner(int insnIndex)
      Returns the "owner" of a particular instruction relative to this instantiation: the owner refers to the Instantiation which will emit the version of this instruction that we will execute.

      Typically, the return value is either this or null. this indicates that this instantiation will generate the version of this instruction that we will execute, and null indicates that this instantiation never executes the given instruction.

      Sometimes, however, an instruction can belong to multiple subroutines; this is called a shared instruction, and occurs when multiple subroutines branch to common points of control. In this case, the owner is the oldest instantiation which owns the instruction in question (parent instantiations are older than their children).

      参数:
      insnIndex - the index of an instruction in the original code.
      返回:
      the "owner" of a particular instruction relative to this instantiation.
    • getClonedLabelForJumpInsn

      LabelNode getClonedLabelForJumpInsn(LabelNode labelNode)
      Returns the clone of the given original label that is appropriate for use in a jump instruction.
      参数:
      labelNode - a label of the original code.
      返回:
      a clone of the given label for use in a jump instruction in the inlined code.
    • getClonedLabel

      LabelNode getClonedLabel(LabelNode labelNode)
      Returns the clone of the given original label that is appropriate for use by a try/catch block or a variable annotation.
      参数:
      labelNode - a label of the original code.
      返回:
      a clone of the given label for use by a try/catch block or a variable annotation in the inlined code.
    • entrySet

      public Set<Map.Entry<LabelNode,LabelNode>> entrySet()
      指定者:
      entrySet 在接口中 Map<LabelNode,LabelNode>
      指定者:
      entrySet 在类中 AbstractMap<LabelNode,LabelNode>
    • get

      public LabelNode get(Object key)
      指定者:
      get 在接口中 Map<LabelNode,LabelNode>
      覆盖:
      get 在类中 AbstractMap<LabelNode,LabelNode>
    • equals

      public boolean equals(Object other)
      指定者:
      equals 在接口中 Map<LabelNode,LabelNode>
      覆盖:
      equals 在类中 AbstractMap<LabelNode,LabelNode>
    • hashCode

      public int hashCode()
      指定者:
      hashCode 在接口中 Map<LabelNode,LabelNode>
      覆盖:
      hashCode 在类中 AbstractMap<LabelNode,LabelNode>