org.objectweb.asm.tree.MethodNode.visitJumpInsn()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中org.objectweb.asm.tree.MethodNode.visitJumpInsn()方法的一些代码示例,展示了MethodNode.visitJumpInsn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MethodNode.visitJumpInsn()方法的具体详情如下:
包路径:org.objectweb.asm.tree.MethodNode
类名称:MethodNode
方法名:visitJumpInsn

MethodNode.visitJumpInsn介绍

暂无

代码示例

代码示例来源:origin: pxb1988/dex2jar

private void visitJOP(int op, Label label){
  mn.visitJumpInsn(op,label);
}
private void visitIIOP(int op, int a, int b){

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

@Override
public void visitJumpInsn(final int opcode, final Label label) {
 super.visitJumpInsn(opcode, label);
 LabelNode labelNode = ((JumpInsnNode) instructions.getLast()).label;
 if (opcode == JSR && !subroutinesInsns.containsKey(labelNode)) {
  subroutinesInsns.put(labelNode, new BitSet());
 }
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

@Override
public void visitJumpInsn(final int opcode, final Label label) {
 super.visitJumpInsn(opcode, label);
 LabelNode labelNode = ((JumpInsnNode) instructions.getLast()).label;
 if (opcode == JSR && !subroutinesInsns.containsKey(labelNode)) {
  subroutinesInsns.put(labelNode, new BitSet());
 }
}

代码示例来源:origin: org.ow2.asm/asm-commons

@Override
public void visitJumpInsn(final int opcode, final Label label) {
 super.visitJumpInsn(opcode, label);
 LabelNode labelNode = ((JumpInsnNode) instructions.getLast()).label;
 if (opcode == JSR && !subroutinesInsns.containsKey(labelNode)) {
  subroutinesInsns.put(labelNode, new BitSet());
 }
}

代码示例来源:origin: org.ow2.asm/asm-debug-all

/**
 * Detects a JSR instruction and sets a flag to indicate we will need to do
 * inlining.
 */
@Override
public void visitJumpInsn(final int opcode, final Label lbl) {
  super.visitJumpInsn(opcode, lbl);
  LabelNode ln = ((JumpInsnNode) instructions.getLast()).label;
  if (opcode == JSR && !subroutineHeads.containsKey(ln)) {
    subroutineHeads.put(ln, new BitSet());
  }
}

代码示例来源:origin: org.parboiled/parboiled-java

@Override
public void visitJumpInsn(int opcode, Label label) {
  usedLabels.add(getLabelNode(label));
  super.visitJumpInsn(opcode, label);
}

代码示例来源:origin: fge/grappa

@Override
public void visitJumpInsn(final int opcode, final Label label)
{
  usedLabels.add(getLabelNode(label));
  super.visitJumpInsn(opcode, label);
}

代码示例来源:origin: RS485/LogisticsPipes

@Override
  public void visitCode() {
    super.visitCode();
    Label l0 = new Label();
    super.visitLabel(l0);
    super.visitVarInsn(Opcodes.ALOAD, 1);
    super.visitMethodInsn(Opcodes.INVOKESTATIC, "logisticspipes/proxy/cc/LPASMHookCC", "handleCCWrappedILuaObject", "(Ldan200/computercraft/api/lua/ILuaObject;)Z");
    Label l1 = new Label();
    super.visitJumpInsn(Opcodes.IFEQ, l1);
    Label l2 = new Label();
    super.visitLabel(l2);
    super.visitVarInsn(Opcodes.ALOAD, 1);
    super.visitMethodInsn(Opcodes.INVOKESTATIC, "logisticspipes/proxy/cc/LPASMHookCC", "returnCCWrappedILuaObject", "(Ldan200/computercraft/api/lua/ILuaObject;)Lorg/luaj/vm2/LuaTable;");
    super.visitInsn(Opcodes.ARETURN);
    super.visitLabel(l1);
  }
};

代码示例来源:origin: RS485/LogisticsPipes

@Override
  public void visitLineNumber(int line, Label start) {
    if (!added) {
      added = true;
      super.visitVarInsn(Opcodes.ALOAD, 1);
      super.visitMethodInsn(Opcodes.INVOKESTATIC, "logisticspipes/proxy/cc/LPASMHookCC", "handleCCToObject", "(Lorg/luaj/vm2/LuaValue;)Z");
      start = new Label();
      super.visitJumpInsn(Opcodes.IFEQ, start);
      Label l5 = new Label();
      super.visitLabel(l5);
      super.visitVarInsn(Opcodes.ALOAD, 1);
      super.visitMethodInsn(Opcodes.INVOKESTATIC, "logisticspipes/proxy/cc/LPASMHookCC", "returnCCToObject", "(Lorg/luaj/vm2/LuaValue;)Ljava/lang/Object;");
      super.visitInsn(Opcodes.ARETURN);
      super.visitLabel(start);
    }
    super.visitLineNumber(line, start);
  }
};

代码示例来源:origin: Mine-and-blade-admin/Battlegear2

private MethodNode generateIsBlockingWithShield() {
  MethodNode mv = new MethodNode(ACC_PUBLIC, "isBlockingWithShield", "()Z", null, null);
  mv.visitCode();
  Label l0 = new Label();
  mv.visitLabel(l0);
  mv.visitVarInsn(ALOAD, 0);
  mv.visitMethodInsn(INVOKESTATIC, UTILITY_CLASS, "canBlockWithShield", "(L" + entityPlayerClassName + ";)Z");
  Label l1 = new Label();
  mv.visitJumpInsn(IFEQ, l1);
  mv.visitVarInsn(ALOAD, 0);
  mv.visitFieldInsn(GETFIELD, entityPlayerClassName, "isShielding", "Z");
  mv.visitJumpInsn(IFEQ, l1);
  mv.visitInsn(ICONST_1);
  Label l2 = new Label();
  mv.visitJumpInsn(GOTO, l2);
  mv.visitLabel(l1);
  mv.visitFrame(F_SAME, 0, null, 0, null);
  mv.visitInsn(ICONST_0);
  mv.visitLabel(l2);
  mv.visitFrame(F_SAME1, 0, null, 1, new Object[]{INTEGER});
  mv.visitInsn(IRETURN);
  Label l3 = new Label();
  mv.visitLabel(l3);
  mv.visitLocalVariable("this", "L" + entityPlayerClassName + ";", null, l0, l3, 0);
  mv.visitMaxs(1, 1);
  mv.visitEnd();
  return mv;
}

代码示例来源:origin: Mine-and-blade-admin/Battlegear2

mv.visitVarInsn(ILOAD, 1);
Label l1 = new Label();
mv.visitJumpInsn(IFEQ, l1);
mv.visitVarInsn(ALOAD, 0);
mv.visitMethodInsn(INVOKESTATIC, UTILITY_CLASS, "canBlockWithShield", "(L" + entityPlayerClassName + ";)Z");
mv.visitJumpInsn(IFEQ, l1);
mv.visitInsn(ICONST_1);
Label l2 = new Label();
mv.visitJumpInsn(GOTO, l2);
mv.visitLabel(l1);
mv.visitFrame(F_SAME1, 0, null, 1, new Object[]{entityPlayerClassName});

代码示例来源:origin: org.multiverse/multiverse-alpha-unborn

m.visitLdcInsn(new Long(0));
m.visitInsn(LCMP);
m.visitJumpInsn(IFEQ, next);
m.visitInsn(ICONST_0);
m.visitInsn(IRETURN);
m.visitFieldInsn(GETFIELD, tranlocalName, "___origin", originDesc);
next = new Label();
m.visitJumpInsn(IFNONNULL, next);
m.visitInsn(ICONST_1);
m.visitInsn(IRETURN);
        case Type.SHORT:
        case Type.INT:
          m.visitJumpInsn(IF_ICMPEQ, next);
          break;
        case Type.FLOAT:
          m.visitInsn(FCMPL);
          m.visitJumpInsn(IFEQ, next);
          break;
        case Type.LONG:
          m.visitInsn(LCMP);
          m.visitJumpInsn(IFEQ, next);
          break;
        case Type.DOUBLE:
          m.visitInsn(DCMPL);
          m.visitJumpInsn(IFEQ, next);
          break;
        case Type.OBJECT:

代码示例来源:origin: Mine-and-blade-admin/Battlegear2

mv.visitJumpInsn(IFEQ, l1);
Label l2 = new Label();
mv.visitLabel(l2);

代码示例来源:origin: ItzSomebody/Radon

mv.visitLabel(l8);
Label l9 = new Label();
mv.visitJumpInsn(GOTO, l9);
Label l10 = new Label();
mv.visitLabel(l10);
mv.visitVarInsn(ALOAD, 7);
mv.visitInsn(ARRAYLENGTH);
mv.visitJumpInsn(IF_ICMPLT, l10);
Label l12 = new Label();
mv.visitLabel(l12);
mv.visitLabel(l15);
Label l16 = new Label();
mv.visitJumpInsn(GOTO, l16);
Label l17 = new Label();
mv.visitLabel(l17);
mv.visitVarInsn(ALOAD, 9);
mv.visitInsn(ARRAYLENGTH);
mv.visitJumpInsn(IF_ICMPLT, l17);
Label l19 = new Label();
mv.visitLabel(l19);
mv.visitLabel(l22);
Label l23 = new Label();
mv.visitJumpInsn(GOTO, l23);
Label l24 = new Label();
mv.visitLabel(l24);

代码示例来源:origin: ItzSomebody/Radon

mv.visitLabel(l5);
Label l6 = new Label();
mv.visitJumpInsn(GOTO, l6);
Label l7 = new Label();
mv.visitLabel(l7);
mv.visitVarInsn(ALOAD, 7);
mv.visitInsn(ARRAYLENGTH);
mv.visitJumpInsn(IF_ICMPLT, l7);
Label l9 = new Label();
mv.visitLabel(l9);
mv.visitLabel(l12);
Label l13 = new Label();
mv.visitJumpInsn(GOTO, l13);
Label l14 = new Label();
mv.visitLabel(l14);
mv.visitVarInsn(ALOAD, 9);
mv.visitInsn(ARRAYLENGTH);
mv.visitJumpInsn(IF_ICMPLT, l14);
Label l16 = new Label();
mv.visitLabel(l16);
mv.visitLabel(l19);
Label l20 = new Label();
mv.visitJumpInsn(GOTO, l20);
Label l21 = new Label();
mv.visitLabel(l21);

相关文章