Esempio n. 1
0
        void IFreeze.Freeze(FreezeBuffer fb)
        {
            fb.Byte((byte)SerializationCode.P6how);
            fb.ObjRef(stable);
            fb.Byte((byte)(isComposed ? 2 : isComposing ? 1 : 0));
            fb.String(rtype);
            fb.ObjRef(roleFactory);
            fb.ObjRef(subsetWhereThunk);
            fb.ObjRef(subsetFilter);

            // local_does not yet used
            fb.Int(lmethods.Count);
            // we do NOT save source position info here, it's only used
            // intra-unit
            foreach (MethodInfo mi in lmethods)
            {
                fb.String(mi.short_name);
                fb.String(mi.long_name);
                fb.ObjRef(mi.impl);
                fb.Byte(checked ((byte)mi.flags));
            }

            fb.Int(local_attr.Count);
            foreach (AttrInfo ai in local_attr)
            {
                fb.String(ai.name);
                fb.ObjRef(ai.init);
                fb.Byte(checked ((byte)ai.flags));
                fb.ObjRef(ai.type);
            }

            fb.Refs <STable>(superclasses);
            fb.Refs <STable>(mro);
        }
Esempio n. 2
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte)SerializationCode.STable);
     fb.ObjRef(mo);
     fb.ObjRef(how);
     fb.ObjRef(who);
     fb.ObjRef(typeObject);
     fb.ObjRef(initObject);
     fb.ObjRef(typeVar);
     fb.ObjRef(initVar);
     fb.String(name);
     fb.Byte((byte)(isSubset ? 1 : 0));
     fb.String(box_type == null ? null : box_type.AssemblyQualifiedName);
     fb.Strings(all_slot);
 }
Esempio n. 3
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.AltInfo);
     fb.Ints(labels);
     fb.Refs(prefixes);
     fb.String(dba);
 }
Esempio n. 4
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte)SerializationCode.VarHash);
     fb.Int(count);
     foreach (KeyValuePair <string, Variable> kv in this)
     {
         fb.String(kv.Key);
         fb.ObjRef(kv.Value);
     }
 }
Esempio n. 5
0
        protected void FreezeSelf(FreezeBuffer fb, Type t)
        {
            fb.Byte((byte)SerializationCode.P6opaque);
            int i;

            for (i = 0; i < FreezeBuffer.boxTypes.Length &&
                 FreezeBuffer.boxTypes[i] != t; i++)
            {
            }
            if (i == FreezeBuffer.boxTypes.Length)
            {
                throw new NotImplementedException(t.FullName);
            }
            fb.Byte((byte)i);
            fb.ObjRef(mo);
            int l = slots == null ? 0 : slots.Length;

            fb.Int(l);
            for (i = 0; i < l; i++)
            {
                fb.ObjRef(slots[i]);
            }
        }
Esempio n. 6
0
        void IFreeze.Freeze(FreezeBuffer fb)
        {
            fb.Byte((byte)SerializationCode.VarDeque);
            fb.Int(count);
            int index = head;

            for (int i = 0; i < count; i++)
            {
                fb.ObjRef(data[index]);
                index++;
                if (index == data.Length)
                {
                    index = 0;
                }
            }
        }
Esempio n. 7
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADAny);
     fb.Refs(zyg);
 }
Esempio n. 8
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.CC);
     fb.Ints(vec);
 }
Esempio n. 9
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADStrNoCase);
     fb.String(text);
 }
Esempio n. 10
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADSequence);
     fb.Refs(args);
 }
Esempio n. 11
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADMethod);
     fb.String(name);
 }
Esempio n. 12
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte)SerializationCode.FatRat);
     fb.ObjRef(num);
     fb.ObjRef(den);
 }
Esempio n. 13
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte)SerializationCode.Rat);
     fb.ObjRef(num);
     fb.Long((long)den);
 }
Esempio n. 14
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte)SerializationCode.Complex);
     fb.Double(re);
     fb.Double(im);
 }
Esempio n. 15
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADCC);
     fb.ObjRef(cc);
 }
Esempio n. 16
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADDispatcher);
 }
Esempio n. 17
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADQuant);
     fb.Byte((byte) (type | (z1 != null ? 8 : 0)));
     fb.ObjRef(z0);
     if (z1 != null) fb.ObjRef(z1);
 }
Esempio n. 18
0
 public override void Freeze(FreezeBuffer fb)
 {
     fb.Byte((byte) SerializationCode.LADNone);
 }
Esempio n. 19
0
 void IFreeze.Freeze(FreezeBuffer fb)
 {
     // anyone who holds a ref to one of these needs to recreate it.
     fb.Byte((byte)SerializationCode.Null);
 }