Package org.objectweb.asm

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


        fb.closeRange(catchAll);
        compileStack.writeExceptionTable(fb, catchAll, null);
        compileStack.pop(); //pop fb

        finallyPart.run();
        mv.visitJumpInsn(GOTO, synchronizedEnd);
        mv.visitLabel(catchAll);
        finallyPart.run();
        mv.visitInsn(ATHROW);

        mv.visitLabel(synchronizedEnd);
View Full Code Here


       
        // call for checking if method is still valid
        for (int i = 0; i < argumentCount; ++i) mv.visitVarInsn(Opcodes.ALOAD, i);
        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, superClass, "checkCall", "(Ljava/lang/Object;" + parameterDescription + ")Z");
        Label l0 = new Label();
        mv.visitJumpInsn(Opcodes.IFEQ, l0);
       
        // valid method branch

        Class callClass = cachedMethod.getDeclaringClass().getTheClass();
        boolean useInterface = callClass.isInterface();
View Full Code Here

    mv = cv.visitMethod(ACC_PUBLIC, "checkAndSetF", "(I)V", null, null);
    if (mv != null) {
      mv.visitCode();
      mv.visitVarInsn(ILOAD, 1);
      Label label = new Label();
      mv.visitJumpInsn(IFLT, label);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(ILOAD, 1);
      mv.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
      Label end = new Label();
      mv.visitJumpInsn(GOTO, end);
View Full Code Here

      mv.visitJumpInsn(IFLT, label);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(ILOAD, 1);
      mv.visitFieldInsn(PUTFIELD, "pkg/Bean", "f", "I");
      Label end = new Label();
      mv.visitJumpInsn(GOTO, end);
      mv.visitLabel(label);
      mv.visitFrame(F_SAME, 0, null, 0, null);
      mv.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
      mv.visitInsn(DUP);
      mv.visitMethodInsn(INVOKESPECIAL,
View Full Code Here

            mv.visitFieldInsn(Opcodes.PUTFIELD, className.replace('.', '/'), fieldName, type.toString());
        } else {
            mv.visitFieldInsn(Opcodes.GETFIELD, className.replace('.', '/'), fieldName, type.toString());
            mv.visitVarInsn(Opcodes.ALOAD, 1);
            final Label jmpLabel = new Label();
            mv.visitJumpInsn(Opcodes.IF_ACMPNE, jmpLabel);
            mv.visitVarInsn(Opcodes.ALOAD, 0);
            mv.visitInsn(Opcodes.ACONST_NULL);
            mv.visitFieldInsn(Opcodes.PUTFIELD, className.replace('.', '/'), fieldName, type.toString());
            mv.visitLabel(jmpLabel);
        }
View Full Code Here

      mv.visitLdcInsn(new Integer(n));
    }

    Label fail = new Label();

    mv.visitJumpInsn(Opcodes.IF_ICMPNE, fail);
    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitTypeInsn(Opcodes.CHECKCAST, ETUPLE_NAME + n);
    mv.visitInsn(Opcodes.ARETURN);

    mv.visitLabel(fail);
View Full Code Here

    mv.visitInsn(Opcodes.DUP);
    mv.visitTypeInsn(Opcodes.INSTANCEOF, ETUPLE_NAME + n);
   
    Label fail = new Label();

    mv.visitJumpInsn(Opcodes.IFEQ, fail);
    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitTypeInsn(Opcodes.CHECKCAST, ETUPLE_NAME + n);
    mv.visitInsn(Opcodes.ARETURN);

    mv.visitLabel(fail);
View Full Code Here

        mv.visitVarInsn(Opcodes.ALOAD, 0);
        mv.visitTypeInsn(INSTANCEOF, EFUN_NAME+n);

        Label fail = new Label();

        mv.visitJumpInsn(Opcodes.IFEQ, fail);
        mv.visitVarInsn(Opcodes.ALOAD, 0);
        mv.visitTypeInsn(Opcodes.CHECKCAST, EFUN_NAME+n);
        mv.visitInsn(Opcodes.ARETURN);

        mv.visitLabel(fail);
View Full Code Here

                mv.visitInsn(ICONST_0);
                mv.visitVarInsn(ISTORE, index);
                Label l1b = new Label();
                mv.visitLabel(l1b);
                Label l2b = new Label();
                mv.visitJumpInsn(GOTO, l2b);

                // Loop
                Label l3b = new Label();
                mv.visitLabel(l3b);
                mv.visitVarInsn(ALOAD, 0);
View Full Code Here

                mv.visitLabel(l2b);
                mv.visitVarInsn(ILOAD, index);
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, className, delegator.getName(), "[L" + delegator.getSpecification().getName().replace('.', '/') + ";");
                mv.visitInsn(ARRAYLENGTH);
                mv.visitJumpInsn(IF_ICMPLT, l3b);

                Label l5b = new Label();
                mv.visitLabel(l5b);
                mv.visitInsn(RETURN);
            }
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.