Package org.objectweb.asm

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


    // make the method attributes
    mv = cv.visitMethod(ACC_PROTECTED, "compile",
        "()" + ESEQ_TYPE.getDescriptor(), null, null);
    mv.visitCode();
    mv.visitFieldInsn(Opcodes.GETSTATIC, self_type.getInternalName(),
        "compile", ESEQ_TYPE.getDescriptor());
    mv.visitInsn(ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
View Full Code Here


      l.fun.emit_const(mv);
      push_int(mv, l.arity);
      push_int(mv, l.old_index);
      push_int(mv, l.index);
      push_int(mv, l.old_uniq);
      mv.visitFieldInsn(GETSTATIC, self_type.getInternalName(),
          "module_md5", EBINARY_TYPE.getDescriptor());

      mv.visitMethodInsn(
          INVOKESPECIAL,
          Type.getInternalName(LocalFunID.class),
View Full Code Here

      mv.visitInsn(DUP);
      cv.visitField(ACC_STATIC, anon_fun_name(l),
          Type.getDescriptor(LocalFunID.class), null, null)
          .visitEnd();
      mv.visitFieldInsn(PUTSTATIC, self_type.getInternalName(),
          anon_fun_name(l), Type.getDescriptor(LocalFunID.class));

      String mname = EUtil.getJavaName(l.fun, l.arity - l.freevars);
      String outer_name = self_type.getInternalName();
      String inner_name = "FN_" + mname;
View Full Code Here

      mv.visitCode();

      mv.visitVarInsn(ALOAD, 1);

      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, full_inner_name, "pid",
          EPID_TYPE.getDescriptor());
      mv.visitLdcInsn(module);

      mv.visitFieldInsn(GETSTATIC, full_inner_name, "old_index", "I");
      mv.visitInsn(I2L);
View Full Code Here

      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, full_inner_name, "pid",
          EPID_TYPE.getDescriptor());
      mv.visitLdcInsn(module);

      mv.visitFieldInsn(GETSTATIC, full_inner_name, "old_index", "I");
      mv.visitInsn(I2L);
      mv.visitLdcInsn(new Integer(arity));
      mv.visitFieldInsn(GETSTATIC, outer_name, "module_md5",
          EBINARY_TYPE.getDescriptor());
View Full Code Here

      mv.visitLdcInsn(module);

      mv.visitFieldInsn(GETSTATIC, full_inner_name, "old_index", "I");
      mv.visitInsn(I2L);
      mv.visitLdcInsn(new Integer(arity));
      mv.visitFieldInsn(GETSTATIC, outer_name, "module_md5",
          EBINARY_TYPE.getDescriptor());

      mv.visitFieldInsn(GETSTATIC, full_inner_name, "index", "I");
      mv.visitInsn(I2L);
      mv.visitFieldInsn(GETSTATIC, full_inner_name, "old_uniq", "I");
View Full Code Here

      mv.visitInsn(I2L);
      mv.visitLdcInsn(new Integer(arity));
      mv.visitFieldInsn(GETSTATIC, outer_name, "module_md5",
          EBINARY_TYPE.getDescriptor());

      mv.visitFieldInsn(GETSTATIC, full_inner_name, "index", "I");
      mv.visitInsn(I2L);
      mv.visitFieldInsn(GETSTATIC, full_inner_name, "old_uniq", "I");
      mv.visitInsn(I2L);

      mv.visitLdcInsn(new Integer(freevars));
View Full Code Here

      mv.visitFieldInsn(GETSTATIC, outer_name, "module_md5",
          EBINARY_TYPE.getDescriptor());

      mv.visitFieldInsn(GETSTATIC, full_inner_name, "index", "I");
      mv.visitInsn(I2L);
      mv.visitFieldInsn(GETSTATIC, full_inner_name, "old_uniq", "I");
      mv.visitInsn(I2L);

      mv.visitLdcInsn(new Integer(freevars));
      mv.visitTypeInsn(ANEWARRAY, EOBJECT_NAME);
View Full Code Here

        } else {
          mv.visitLdcInsn(new Integer(i));
        }

        mv.visitVarInsn(ALOAD, 0); // load self
        mv.visitFieldInsn(GETFIELD, full_inner_name, "fv" + i,
            EOBJECT_DESC);

        mv.visitInsn(AASTORE);
      }
View Full Code Here

    }

    if (lambda != null) {
      mv.visitVarInsn(ALOAD, 0);
      mv.visitVarInsn(ALOAD, 1);
      mv.visitFieldInsn(PUTFIELD, full_inner_name, "pid",
          EPID_TYPE.getDescriptor());

    }

    for (int i = 0; i < freevars; 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.