Package org.objectweb.asm

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


    mv.visitVarInsn(ALOAD, 0);
    mv.visitVarInsn(ALOAD, 2);
    mv.visitInsn(ICONST_0);
    mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/utils/Bag", "get", "(I)Ljava/lang/Object;");
    mv.visitTypeInsn(CHECKCAST, typeName);
    mv.visitFieldInsn(GETFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    mv.visitFieldInsn(PUTFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    Label l7 = new Label();
    mv.visitLabel(l7);
    Label l8 = new Label();
    mv.visitJumpInsn(GOTO, l8);
View Full Code Here


    mv.visitVarInsn(ALOAD, 2);
    mv.visitInsn(ICONST_0);
    mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/utils/Bag", "get", "(I)Ljava/lang/Object;");
    mv.visitTypeInsn(CHECKCAST, typeName);
    mv.visitFieldInsn(GETFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    mv.visitFieldInsn(PUTFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    Label l7 = new Label();
    mv.visitLabel(l7);
    Label l8 = new Label();
    mv.visitJumpInsn(GOTO, l8);
    mv.visitLabel(l5);
View Full Code Here

    mv.visitLabel(l5);
    mv.visitFrame(Opcodes.F_FULL, 3, new Object[] {typeName, "com/artemis/World", "com/artemis/utils/Bag"}, 0, new Object[] {});
    mv.visitVarInsn(ALOAD, 0);
    mv.visitIntInsn(SIPUSH, ClassMetadataUtil.sizeOf(meta) * 128);
    mv.visitMethodInsn(INVOKESTATIC, "java/nio/ByteBuffer", "allocateDirect", "(I)Ljava/nio/ByteBuffer;");
    mv.visitFieldInsn(PUTFIELD, typeName, "$data", "Ljava/nio/ByteBuffer;");
    Label l9 = new Label();
    mv.visitLabel(l9);
    mv.visitTypeInsn(NEW, "com/artemis/utils/Bag");
    mv.visitInsn(DUP);
    mv.visitMethodInsn(INVOKESPECIAL, "com/artemis/utils/Bag", "<init>", "()V");
View Full Code Here

    mv.visitInsn(DUP);
    mv.visitMethodInsn(INVOKESPECIAL, "com/artemis/utils/Bag", "<init>", "()V");
    mv.visitVarInsn(ASTORE, 2);
    Label l10 = new Label();
    mv.visitLabel(l10);
    mv.visitFieldInsn(GETSTATIC, typeName, "$store", "Ljava/util/Map;");
    mv.visitVarInsn(ALOAD, 1);
    mv.visitVarInsn(ALOAD, 2);
    mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
    mv.visitInsn(POP);
    mv.visitLabel(l8);
View Full Code Here

    if (instanceFields(meta).size() > 0) {
      mv.visitLabel(l0);
      mv.visitInsn(ICONST_1);
      mv.visitVarInsn(ILOAD, 1);
      mv.visitInsn(IADD);
      mv.visitFieldInsn(GETSTATIC, owner, "$_SIZE_OF", "I");
      mv.visitInsn(IMUL);
      mv.visitVarInsn(ISTORE, 2);
      Label l1 = new Label();
      mv.visitLabel(l1);
      mv.visitLabel(l1);
View Full Code Here

      mv.visitVarInsn(ISTORE, 2);
      Label l1 = new Label();
      mv.visitLabel(l1);
      mv.visitLabel(l1);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, owner, "$data", "Ljava/nio/ByteBuffer;");
      mv.visitMethodInsn(INVOKEVIRTUAL, "java/nio/ByteBuffer", "capacity", "()I");
      mv.visitVarInsn(ILOAD, 2);
      Label l2 = new Label();
      mv.visitJumpInsn(IF_ICMPGE, l2);
      Label l3 = new Label();
View Full Code Here

      Label l3 = new Label();
      mv.visitLabel(l3);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitInsn(ICONST_2);
      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETFIELD, owner, "$data", "Ljava/nio/ByteBuffer;");
      mv.visitMethodInsn(INVOKEVIRTUAL, "java/nio/ByteBuffer", "capacity", "()I");
      mv.visitVarInsn(ILOAD, 2);
      mv.visitMethodInsn(INVOKESTATIC, "java/lang/Math", "max", "(II)I");
      mv.visitInsn(IMUL);
      mv.visitMethodInsn(INVOKESPECIAL, owner, "$grow", "(I)V");
View Full Code Here

    mv.visitCode();
    Label l0 = new Label();
    mv.visitLabel(l0);
    if (instanceFields(meta).size() > 0) {
      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETSTATIC, owner, "$_SIZE_OF", "I");
      mv.visitVarInsn(ALOAD, 1);
      mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/Entity", "getId", "()I");
      mv.visitInsn(IMUL);
      mv.visitFieldInsn(PUTFIELD, owner, "$stride", "I");
      Label l1 = new Label();
View Full Code Here

      mv.visitVarInsn(ALOAD, 0);
      mv.visitFieldInsn(GETSTATIC, owner, "$_SIZE_OF", "I");
      mv.visitVarInsn(ALOAD, 1);
      mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/Entity", "getId", "()I");
      mv.visitInsn(IMUL);
      mv.visitFieldInsn(PUTFIELD, owner, "$stride", "I");
      Label l1 = new Label();
      mv.visitLabel(l1);
    }
    mv.visitInsn(RETURN);
    Label l2 = new Label();
View Full Code Here

    Label l0 = new Label();
    mv.visitLabel(l0);
    for (FieldDescriptor fd : fields) {
      mv.visitVarInsn(ALOAD, 0);
      mv.visitInsn(TypedOpcodes.tCONST(fd));
      mv.visitFieldInsn(PUTFIELD, owner, fd.name, fd.desc);
    }
   
    mv.visitInsn(RETURN);
   
    Label l3 = new Label();
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.