Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.MethodNode.visitVarInsn()


  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    mn.visitInsn(ICONST_0);
    mn.visitInsn(IADD);
    mn.visitInsn(IRETURN);
    mn.visitMaxs(0, 0);
    mn.visitEnd();
View Full Code Here


  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    mn.visitVarInsn(ISTORE, 1);
    mn.visitVarInsn(ILOAD, 1);
    mn.visitInsn(IRETURN);
    mn.visitMaxs(0, 0);
    mn.visitEnd();
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    mn.visitVarInsn(ISTORE, 1);
    mn.visitVarInsn(ILOAD, 1);
    mn.visitInsn(IRETURN);
    mn.visitMaxs(0, 0);
    mn.visitEnd();
    new RemoveLoadStoreTransformer(null).transform(mn);
View Full Code Here

    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    mn.visitVarInsn(ISTORE, 1);
    mn.visitVarInsn(ILOAD, 1);
    mn.visitInsn(IRETURN);
    mn.visitMaxs(0, 0);
    mn.visitEnd();
    new RemoveLoadStoreTransformer(null).transform(mn);
    mn.accept(tmv);
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    Label label = new Label();
    mn.visitJumpInsn(IFLT, label);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ILOAD, 1);
    mn.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
View Full Code Here

    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    Label label = new Label();
    mn.visitJumpInsn(IFLT, label);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ILOAD, 1);
    mn.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
    Label end = new Label();
    mn.visitJumpInsn(GOTO, end);
    mn.visitLabel(label);
View Full Code Here

    mn.visitCode();
    mn.visitVarInsn(ILOAD, 1);
    Label label = new Label();
    mn.visitJumpInsn(IFLT, label);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ILOAD, 1);
    mn.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
    Label end = new Label();
    mn.visitJumpInsn(GOTO, end);
    mn.visitLabel(label);
    mn.visitFrame(F_SAME, 0, null, 0, null);
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitFieldInsn(GETFIELD, "C", "f", "I");
    mn.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mn.visitFieldInsn(GETFIELD, "C", "f", "I");
View Full Code Here

  public void test() {
    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitFieldInsn(GETFIELD, "C", "f", "I");
    mn.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mn.visitFieldInsn(GETFIELD, "C", "f", "I");
    mn.visitInsn(IRETURN);
View Full Code Here

    TraceMethodVisitor tmv = new TraceMethodVisitor(null);
    MethodNode mn = new MethodNode(0, null, null, null, null);
    mn.visitCode();
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitVarInsn(ALOAD, 0);
    mn.visitFieldInsn(GETFIELD, "C", "f", "I");
    mn.visitFieldInsn(PUTFIELD, "C", "f", "I");
    mn.visitFieldInsn(GETFIELD, "C", "f", "I");
    mn.visitInsn(IRETURN);
    mn.visitMaxs(0, 0);
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.