Package org.objectweb.asm

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


      String inner_name = "FN_" + mname;
      String full_inner_name = outer_name + "$" + inner_name;

      mv.visitLdcInsn(full_inner_name.replace('/', '.'));

      mv.visitMethodInsn(INVOKESTATIC, Type.getInternalName(Class.class),
          "forName", "(Ljava/lang/String;)Ljava/lang/Class;");

      mv.visitMethodInsn(
          INVOKESTATIC,
          Type.getInternalName(EModuleManager.class),
View Full Code Here


      mv.visitLdcInsn(full_inner_name.replace('/', '.'));

      mv.visitMethodInsn(INVOKESTATIC, Type.getInternalName(Class.class),
          "forName", "(Ljava/lang/String;)Ljava/lang/Class;");

      mv.visitMethodInsn(
          INVOKESTATIC,
          Type.getInternalName(EModuleManager.class),
          "register_lambda",
          "(" + Type.getDescriptor(LocalFunID.class)
              + Type.getDescriptor(Class.class) + ")V");
View Full Code Here

            EOBJECT_DESC);

        mv.visitInsn(AASTORE);
      }

      mv.visitMethodInsn(
          INVOKEVIRTUAL,
          Type.getInternalName(EOutputStream.class),
          "write_fun",
          "(" + EPID_TYPE.getDescriptor() + "Ljava/lang/String;"
              + "JI" + EBINARY_TYPE.getDescriptor() + "JJ"
View Full Code Here

    mv.visitVarInsn(ALOAD, 0);
    if (exported) {
      mv.visitLdcInsn(module_name);
      mv.visitLdcInsn(function_name);
      mv.visitMethodInsn(INVOKESPECIAL, super_class_name, "<init>",
          "(Ljava/lang/String;Ljava/lang/String;)V");
    } else {
      mv.visitMethodInsn(INVOKESPECIAL, super_class_name, "<init>", "()V");
    }
View Full Code Here

      mv.visitLdcInsn(module_name);
      mv.visitLdcInsn(function_name);
      mv.visitMethodInsn(INVOKESPECIAL, super_class_name, "<init>",
          "(Ljava/lang/String;Ljava/lang/String;)V");
    } else {
      mv.visitMethodInsn(INVOKESPECIAL, super_class_name, "<init>", "()V");
    }

    if (lambda != null) {
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(ALOAD, 1);
View Full Code Here

          ENIL_TYPE.getDescriptor());
      for (int i = freevars - 1; i >= 0; i--) {
        mv.visitVarInsn(ALOAD, 0);
        mv.visitFieldInsn(GETFIELD, full_inner_name, "fv" + i,
            EOBJECT_DESC);
        mv.visitMethodInsn(INVOKEVIRTUAL, ESEQ_NAME, "cons", "("
            + EOBJECT_DESC + ")" + ESEQ_DESC);
      }
      mv.visitInsn(ARETURN);
      mv.visitMaxs(3, 3);
      mv.visitEnd();
View Full Code Here

            mv.visitVarInsn(Opcodes.ALOAD, 2);
            push_int(mv, i);
            mv.visitInsn(Opcodes.AALOAD);
        }

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

        mv.visitInsn(Opcodes.ARETURN);
        mv.visitMaxs(arity + 2, arity + 2);
        mv.visitEnd();
View Full Code Here

        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");
        mv.visitInsn(Opcodes.RETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();
View Full Code Here

                    + EATOM_DESC
                    + ")V", null, null);
            mv.visitCode();

            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, super_class_name, "<init>",
                    "()V");

            mv.visitVarInsn(ALOAD, 0);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitFieldInsn(PUTFIELD, self_type, "handler", EFUNHANDLER_TYPE
View Full Code Here

            /** forward toString to handler */
            mv = cw.visitMethod(ACC_PUBLIC, "toString", "()Ljava/lang/String;", null, null);
            mv.visitCode();
            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
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.