Exemplo n.º 1
0
 public void write(ByteArrayBuffer writer) {
   if (slotModified()) {
     writer.writeInt(_key);
     writer.writeInt(_newSlot.address());
     writer.writeInt(_newSlot.length());
   }
 }
Exemplo n.º 2
0
 public void writePointer(int id, Slot slot) {
   if (DTrace.enabled) {
     DTrace.WRITE_POINTER.log(id);
     DTrace.WRITE_POINTER.logLength(slot);
   }
   _pointerIo.seek(0);
   if (Deploy.debug) {
     _pointerIo.writeBegin(Const4.YAPPOINTER);
   }
   _pointerIo.writeInt(slot.address());
   _pointerIo.writeInt(slot.length());
   if (Deploy.debug) {
     _pointerIo.writeEnd();
   }
   if (Debug4.xbytes) {
     _pointerIo.checkXBytes(false);
   }
   writeBytes(_pointerIo, id, 0);
 }
  public void write(
      final Transaction trans, final ClassMetadata clazz, final ByteArrayBuffer writer) {

    writer.writeShortString(trans, clazz.nameToWrite());

    int intFormerlyKnownAsMetaClassID = 0;
    writer.writeInt(intFormerlyKnownAsMetaClassID);

    writer.writeIDOf(trans, clazz.i_ancestor);

    writeIndex(trans, clazz, writer);

    writer.writeInt(clazz.declaredAspectCount());
    clazz.forEachDeclaredAspect(
        new Procedure4() {
          public void apply(Object arg) {
            _family._field.write(trans, clazz, (ClassAspect) arg, writer);
          }
        });
  }
Exemplo n.º 4
0
 public final void write(ByteArrayBuffer a_writer) {
   // byte order: size, address
   a_writer.writeInt(_key);
   a_writer.writeInt(_peer._key);
 }
 protected void writeIndex(Transaction trans, ClassMetadata clazz, ByteArrayBuffer writer) {
   int indexID = clazz.index().write(trans);
   writer.writeInt(indexIDForWriting(indexID));
 }