Package org.objectweb.asm

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


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

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

  private static void create_constructor(ClassVisitor cw,
      String super_class_name) {
    MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V",
View Full Code Here


    mv.visitVarInsn(Opcodes.ALOAD, 0); // load this
    mv.visitMethodInsn(Opcodes.INVOKESPECIAL, super_class_name, "<init>",
        "()V");
    mv.visitInsn(Opcodes.RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }

  public static void dump(String name, byte[] data) {

    name = name.replace('.'  , '/');
View Full Code Here

        "()Ljava/lang/String;", null, null);
    mv.visitCode();
    mv.visitLdcInsn(this.module_name.getName());
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();

    // make the method attributes
    mv = cv.visitMethod(ACC_PROTECTED, "attributes",
        "()" + ESEQ_TYPE.getDescriptor(), null, null);
    mv.visitCode();
View Full Code Here

    mv.visitCode();
    mv.visitFieldInsn(Opcodes.GETSTATIC, self_type.getInternalName(),
        "attributes", ESEQ_TYPE.getDescriptor());
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();

    // make the method attributes
    mv = cv.visitMethod(ACC_PROTECTED, "compile",
        "()" + ESEQ_TYPE.getDescriptor(), null, null);
    mv.visitCode();
View Full Code Here

    mv.visitCode();
    mv.visitFieldInsn(Opcodes.GETSTATIC, self_type.getInternalName(),
        "compile", ESEQ_TYPE.getDescriptor());
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();

    // make default constructor
    mv = cv.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
    mv.visitCode();
    mv.visitVarInsn(ALOAD, 0);
View Full Code Here

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

    mv = cv.visitMethod(ACC_PUBLIC, "registerImportsAndExports", "()V",
        null, null);
    mv.visitCode();
    mv.visitVarInsn(ALOAD, 0);
View Full Code Here

              + Type.getDescriptor(Class.class) + ")V");
    }

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

  }

  public static String anon_fun_name(Lambda l) {
    return "lambda_" + l.index + "_" + l.old_index + "_" + l.old_uniq;
View Full Code Here

              + "JI" + EBINARY_TYPE.getDescriptor() + "JJ"
              + Type.getDescriptor(EObject[].class) + ")V");

      mv.visitInsn(RETURN);
      mv.visitMaxs(10, 3);
      mv.visitEnd();
    }

    make_constructor(cw, module, function, full_inner_name,
        outer_name,
        super_class_name, lambda, exported);
View Full Code Here

      mv.visitFieldInsn(PUTFIELD, full_inner_name, "fv" + i, EOBJECT_DESC);
    }

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

    if (lambda != null) {
      mv = cw.visitMethod(ACC_PROTECTED, "get_env", "()" + ESEQ_DESC,
          null, null);
      mv.visitCode();
View Full Code Here

        mv.visitMethodInsn(INVOKEVIRTUAL, ESEQ_NAME, "cons", "("
            + EOBJECT_DESC + ")" + ESEQ_DESC);
      }
      mv.visitInsn(ARETURN);
      mv.visitMaxs(3, 3);
      mv.visitEnd();

      mv = cw.visitMethod(ACC_PROTECTED, "get_pid", "()" + EOBJECT_DESC,
          null, null);
      mv.visitCode();
      mv.visitVarInsn(ALOAD, 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.