Package org.objectweb.asm

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


      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, full_inner_name, "pid",
          EPID_TYPE.getDescriptor());
      mv.visitInsn(ARETURN);
      mv.visitMaxs(3, 3);
      mv.visitEnd();

      mv = cw.visitMethod(ACC_PROTECTED, "get_id",
          "()" + Type.getDescriptor(FunID.class), null, null);
      mv.visitCode();
      mv.visitFieldInsn(GETSTATIC,
View Full Code Here


      mv.visitFieldInsn(GETSTATIC,
          outer_name,
          anon_fun_name(lambda), Type.getDescriptor(LocalFunID.class));
      mv.visitInsn(ARETURN);
      mv.visitMaxs(3, 3);
      mv.visitEnd();

    }
  }

    public static void make_invoketail_method(ClassWriter cw,
View Full Code Here

        MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "arity", "()I", null, null);
        mv.visitCode();
        mv.visitLdcInsn(new Integer(arity));
        mv.visitInsn(Opcodes.IRETURN);
        mv.visitMaxs(2, 2);
        mv.visitEnd();

        mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "invoke", "("
                + EPROC_TYPE.getDescriptor() + EOBJECT_ARR_TYPE.getDescriptor()
                + ")" + EOBJECT_TYPE.getDescriptor(), null, PAUSABLE_EX);
        mv.visitCode();
View Full Code Here

        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, self_type, "invoke", EUtil
                .getSignature(arity, true));

        mv.visitInsn(Opcodes.ARETURN);
        mv.visitMaxs(arity + 2, arity + 2);
        mv.visitEnd();

        mv = cw.visitMethod(Opcodes.ACC_PROTECTED, "<init>", "()V", null, null);
        mv.visitVarInsn(Opcodes.ALOAD, 0);
        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, EFUN_TYPE.getInternalName(),
                "<init>", "()V");
View Full Code Here

        mv.visitVarInsn(Opcodes.ALOAD, 0);
        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, EFUN_TYPE.getInternalName(),
                "<init>", "()V");
        mv.visitInsn(Opcodes.RETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();

        make_cast_method(cw, arity);

        cw.visitEnd();
View Full Code Here

            mv.visitVarInsn(ALOAD, 3);
            mv.visitFieldInsn(PUTFIELD, self_type, "function_name", EATOM_DESC);

            mv.visitInsn(RETURN);
            mv.visitMaxs(4, 4);
            mv.visitEnd();

            /** forward toString to handler */
            mv = cw.visitMethod(ACC_PUBLIC, "toString", "()Ljava/lang/String;", null, null);
            mv.visitCode();
            mv.visitVarInsn(ALOAD, 0); // load self
View Full Code Here

            mv.visitVarInsn(ALOAD, 0); // load self
            mv.visitFieldInsn(GETFIELD, self_type, "handler", EFUNHANDLER_TYPE.getDescriptor());
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "toString", "()Ljava/lang/String;");
            mv.visitInsn(ARETURN);
            mv.visitMaxs(3, 3);
            mv.visitEnd();

            // make invoke_tail method
            //CompilerVisitor.make_invoketail_method(cw, self_type, arity, 0);
            make_invoke_method(cw, self_type, arity);
            make_go_method(cw, self_type, arity);
View Full Code Here

        mv.visitLabel(fail);
        mv.visitInsn(Opcodes.ACONST_NULL);
        mv.visitInsn(Opcodes.ARETURN);

        mv.visitMaxs(2, 2);
        mv.visitEnd();
    }


    private static void make_go_method(ClassWriter cw, String self_type,
                                       int arity) {
View Full Code Here

              mv.visitVarInsn(ALOAD, 0);
              generateClassCall(mv);
              mv.visitInsn(ARETURN);
     
              mv.visitMaxs(0, 0);
              mv.visitEnd();
        }
      }
        cv.visitEnd();
    }
View Full Code Here

              mv.visitVarInsn(ALOAD, 0);
              generateClassCall(mv);
              mv.visitInsn(ARETURN);
     
              mv.visitMaxs(0, 0);
              mv.visitEnd();
        }
      }

        if (!stripAttributes) {
          RetroWeaverAttribute a = new RetroWeaverAttribute(Weaver.getBuildNumber(), originalClassVersion);       
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.