Package org.objectweb.asm

Examples of org.objectweb.asm.MethodVisitor.visitInsn()


    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new RemoveAddZeroAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here


    MethodVisitor mv = new RemoveAddZeroAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

    MethodVisitor mv = new RemoveLoadStoreAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitVarInsn(ISTORE, 1);
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mv.visitFieldInsn(GETFIELD, "C", "f", "I");
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv;
    mv = new RemoveNopClassAdapter(null).new RemoveNopAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(NOP);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
View Full Code Here

    MethodVisitor mv;
    mv = new RemoveNopClassAdapter(null).new RemoveNopAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(NOP);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
View Full Code Here

    mv = new RemoveNopClassAdapter(null).new RemoveNopAdapter(tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(NOP);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(NOP);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    checkMethod(tmv);
  }
View Full Code Here

    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodVisitor mv = new BasicVerifierAdapter("C", ACC_PUBLIC, "m",
        "(I)I", tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(2, 2);
    mv.visitEnd();
  }
View Full Code Here

    MethodVisitor mv = new BasicVerifierAdapter("C", ACC_PUBLIC, "m",
        "(I)I", tmv);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(ICONST_0);
    mv.visitInsn(IADD);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(2, 2);
    mv.visitEnd();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.