Package org.objectweb.asm

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


    mv.visitMethodInsn(INVOKESTATIC, "org/renjin/eval/Context", "newTopLevelContext", "()Lorg/renjin/Context;");
    mv.visitVarInsn(ASTORE, 1);

   
   
    mv.visitEnd();
   
  }
 
  private void compileBody(IRBody body) {
   
View Full Code Here


    mv.visitCode();
    mv.visitVarInsn(ALOAD, THIS);
    mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
    mv.visitInsn(RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();   
  }

  private static void writeLoadMethod(ClassWriter cw, String packageName, Environment rho) {
    MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "load",
        "(Lorg/renjin/eval/Context;Lorg/renjin/sexp/Environment;)V", null, null);
View Full Code Here

        throw new RuntimeException("Error generating code for '" + symbol + "'", e);
      }
    }
    mv.visitInsn(RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }


  private static void storeClosure(MethodVisitor mv, String packageName, Symbol symbol) {
    mv.visitVarInsn(ALOAD, ENVIRONMENT);
View Full Code Here

    mv.visitCode();
    ConstantGeneratingVisitor cgv = new ConstantGeneratingVisitor(mv);
    thunk.getSExpression().accept(cgv);
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
}
  private void writeDoEvalBody(MethodVisitor mv) {
    IRBody body = thunk.getBody();
View Full Code Here

     
    generationContext.getSexpPool().writeConstructorBody(mv);
   
    mv.visitInsn(RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }

  private void writeDoEval() {
    MethodVisitor mv = cv.visitMethod(ACC_PUBLIC, "doApply",
        "(Lorg/renjin/eval/Context;)Lorg/renjin/sexp/SEXP;", null, null);
View Full Code Here

    mv.visitVarInsn(ASTORE, 2);

    writeDoEvalBody(mv);
   
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }
 
  private void writeFormals() {
 
    MethodVisitor mv = cv.visitMethod(ACC_PRIVATE + ACC_STATIC,
View Full Code Here

   
    ConstantGeneratingVisitor cgv = new ConstantGeneratingVisitor(mv);
    closure.getFormals().accept(cgv);
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 0);
    mv.visitEnd();
  }

  private void writeBodySexp() {

    MethodVisitor mv = cv.visitMethod(ACC_PRIVATE + ACC_STATIC,
View Full Code Here

    mv.visitCode();
    ConstantGeneratingVisitor cgv = new ConstantGeneratingVisitor(mv);
    closure.getBodyExpression().accept(cgv);
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 0);
    mv.visitEnd();
}
  private void writeDoEvalBody(MethodVisitor mv) {
    ByteCodeVisitor visitor = new ByteCodeVisitor(generationContext, mv);
View Full Code Here

    // initialize sexp pool
    generationContext.getSexpPool().writeConstructorBody(mv);
   
    mv.visitInsn(RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }

  private void writeStaticDoEval() { 
    MethodVisitor mv = cv.visitMethod(ACC_PUBLIC + ACC_STATIC, "doEval", "(Lorg/renjin/eval/Context;Lorg/renjin/sexp/Environment;)Lorg/renjin/sexp/SEXP;", null, null);
    mv.visitCode();
View Full Code Here

    MethodVisitor mv = cv.visitMethod(ACC_PUBLIC + ACC_STATIC, "doEval", "(Lorg/renjin/eval/Context;Lorg/renjin/sexp/Environment;)Lorg/renjin/sexp/SEXP;", null, null);
    mv.visitCode();
    writeDoEvalBody(mv);
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }
 
 
  private void writeSexp() {
    MethodVisitor mv = cv.visitMethod(ACC_PRIVATE + ACC_STATIC,
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.