Exemplo n.º 1
0
            int WriteNameForTarget(BinaryGraphSerializer bsg, int lowid, int offset)
            {
                WrenchTarget tb = targids[lowid];

                byte[] data = bsg.enc.GetBytes(tb.Name);
                bsg.bw.Write(data);

                return(data.Length);
            }
Exemplo n.º 2
0
	public static void Write (GraphBuilder gb, string file)
	{
	    BinaryGraphSerializer bsg = new BinaryGraphSerializer (gb, file);

	    try {
		bsg.Write ();
	    } catch (Exception e) {
		File.Delete (file);
		throw e;
	    }
	}
Exemplo n.º 3
0
        public static void Write(GraphBuilder gb, string file)
        {
            BinaryGraphSerializer bsg = new BinaryGraphSerializer(gb, file);

            try {
                bsg.Write();
            } catch (Exception e) {
                File.Delete(file);
                throw e;
            }
        }
Exemplo n.º 4
0
            int WriteDepsForTarget(BinaryGraphSerializer bsg, int tid, int offset)
            {
                WrenchTarget tb       = targids[tid];
                int          nwritten = 0;

                DepsCollector dc = new DepsCollector(bsg);

                tb.VisitDependencies(dc);
                nwritten = dc.Write();

                return(nwritten);
            }
Exemplo n.º 5
0
            public int WriteNames(BinaryGraphSerializer bsg, int offset)
            {
                int orig_ofs = offset;

                for (int i = 0; i < dep_offsets.Length; i++)
                {
                    name_offsets[i] = offset;
                    offset         += WriteNameForTarget(bsg, i, offset);
                }

                name_chunk_len = offset - orig_ofs;
                return(offset);
            }
Exemplo n.º 6
0
            public void WriteProviderData(BinaryGraphSerializer bsg)
            {
                bsg.bw.Write(dep_offsets.Length);
                bsg.bw.Write(pb.Basis);
                bsg.bw.Write(pb.DeclarationLoc);
                bsg.bw.Write(dep_chunk_len);
                BinaryHelper.WriteRaw(bsg.bw, dep_offsets);
                bsg.bw.Write(name_chunk_len);
                BinaryHelper.WriteRaw(bsg.bw, name_offsets);

                for (int i = 0; i < dep_offsets.Length; i++)
                {
                    WrenchTarget tb = targids[i];
                    BinaryHelper.WriteRaw(bsg.bw, bsg.RegisterType(tb.RuleType));
                    bsg.ScanTags(tb);  // For later ...
                }
            }
Exemplo n.º 7
0
	    public void WriteProviderData (BinaryGraphSerializer bsg)
	    {
		bsg.bw.Write (dep_offsets.Length);
		bsg.bw.Write (pb.Basis);
		bsg.bw.Write (pb.DeclarationLoc);
		bsg.bw.Write (dep_chunk_len);
		BinaryHelper.WriteRaw (bsg.bw, dep_offsets);
		bsg.bw.Write (name_chunk_len);
		BinaryHelper.WriteRaw (bsg.bw, name_offsets);

		for (int i = 0; i < dep_offsets.Length; i++) {
		    WrenchTarget tb = targids[i];
		    BinaryHelper.WriteRaw (bsg.bw, bsg.RegisterType (tb.RuleType));
		    bsg.ScanTags (tb); // For later ...
		}
	    }
Exemplo n.º 8
0
	    int WriteNameForTarget (BinaryGraphSerializer bsg, int lowid, int offset)
	    {
		WrenchTarget tb = targids[lowid];

		byte[] data = bsg.enc.GetBytes (tb.Name);
		bsg.bw.Write (data);

		return data.Length;
	    }
Exemplo n.º 9
0
	    public int WriteNames (BinaryGraphSerializer bsg, int offset)
	    {
		int orig_ofs = offset;

		for (int i = 0; i < dep_offsets.Length; i++) {
		    name_offsets[i] = offset;
		    offset += WriteNameForTarget (bsg, i, offset);
		}

		name_chunk_len = offset - orig_ofs;
		return offset;
	    }
Exemplo n.º 10
0
	    int WriteDepsForTarget (BinaryGraphSerializer bsg, int tid, int offset)
	    {
		WrenchTarget tb = targids[tid];
		int nwritten = 0;

		DepsCollector dc = new DepsCollector (bsg);
		tb.VisitDependencies (dc);
		nwritten = dc.Write ();

		return nwritten;
	    }
Exemplo n.º 11
0
		public DepsCollector (BinaryGraphSerializer bsg)
		{
		    this.bsg = bsg;
		}
Exemplo n.º 12
0
 public DepsCollector(BinaryGraphSerializer bsg)
 {
     this.bsg = bsg;
 }