Package org.objectweb.asm

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


        }

        // GENERATE helper = new ExceptionHelper(this, target, source, lineNumber)
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);

        methodVisitor.visitTypeInsn(Opcodes.NEW, helperType.getInternalName());
        methodVisitor.visitInsn(Opcodes.DUP);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 1);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 2);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 3);
View Full Code Here


        MethodVisitor mv = controller.getMethodVisitor();

        statement.getExpression().visit(controller.getAcg());

        // we should infer the type of the exception from the expression
        mv.visitTypeInsn(CHECKCAST, "java/lang/Throwable");
        mv.visitInsn(ATHROW);
       
        controller.getOperandStack().remove(1);
    }
View Full Code Here

      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,
          "java/lang/IllegalArgumentException", "<init>", "()V");
      mv.visitInsn(ATHROW);
      mv.visitLabel(end);
View Full Code Here

       
        mv.visitCode();
        Label line = new Label();
        mv.visitLineNumber(0, line);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitTypeInsn(CHECKCAST, typePath);
        return mv;
    }

    @Deprecated
    private MethodVisitor startCallS(ClassWriter cw) {
View Full Code Here

       
        mv.visitCode();
        Label line = new Label();
        mv.visitLineNumber(0, line);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitTypeInsn(CHECKCAST, typePath);
        return mv;
    }

    @Deprecated
    private MethodVisitor startDispatcher(ClassWriter cw) {
View Full Code Here

       
        mv.visitCode();
        Label line = new Label();
        mv.visitLineNumber(0, line);
        mv.visitVarInsn(ALOAD, 2);
        mv.visitTypeInsn(CHECKCAST, typePath);
        return mv;
    }

    @Deprecated
    private MethodVisitor startCallSFast(ClassWriter cw) {
View Full Code Here

       
        mv.visitCode();
        Label line = new Label();
        mv.visitLineNumber(0, line);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitTypeInsn(CHECKCAST, IRUB);
        return mv;
    }

    private SkinnyMethodAdapter startBlockCall(ClassWriter cw) {
        SkinnyMethodAdapter mv = new SkinnyMethodAdapter(cw.visitMethod(ACC_PUBLIC | ACC_SYNTHETIC | ACC_FINAL, "call", BLOCK_CALL_SIG, null, null));
View Full Code Here

    make_blank_bridge(cw, this_class_name, super_class_name);

    mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "blank", "()L"
        + this_class_name + ";", null, null);
    mv.visitCode();
    mv.visitTypeInsn(Opcodes.NEW, this_class_name);
    mv.visitInsn(Opcodes.DUP);
    mv.visitMethodInsn(Opcodes.INVOKESPECIAL, this_class_name, "<init>",
        "()V");

    mv.visitInsn(Opcodes.ARETURN);
View Full Code Here

    MethodVisitor mv;

    mv = cw.visitMethod(Opcodes.ACC_PUBLIC|Opcodes.ACC_STATIC, "create", "()L"
        + this_class_name + ";", null, null);
    mv.visitCode();
    mv.visitTypeInsn(Opcodes.NEW, this_class_name);
    mv.visitInsn(Opcodes.DUP);
    mv.visitMethodInsn(Opcodes.INVOKESPECIAL, this_class_name, "<init>",
        "()V");

    mv.visitInsn(Opcodes.ARETURN);
View Full Code Here

    sb.append(";");
   
    mv = cw.visitMethod(Opcodes.ACC_PUBLIC|Opcodes.ACC_STATIC, "make_tuple", sb.toString(), null, null);

    mv.visitCode();
    mv.visitTypeInsn(Opcodes.NEW, this_class_name);
    mv.visitInsn(Opcodes.DUP);
    mv.visitMethodInsn(Opcodes.INVOKESPECIAL, this_class_name, "<init>",
        "()V");

    for (int i = 0; i < arity; i++) {
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.