예제 #1
0
        // remeber type and roots
        protected override void VisitType(int id, string name)
        {
            GcType type = new GcType(id, name);

            this.types.Add(type.ID, type);
            this.graph.AddVertex(type);
        }
예제 #2
0
        private void AddTypeEdge(GcType source, GcType target)
        {
            GcTypeEdge edge;

            if (!this.graph.TryGetEdge(source, target, out edge))
            {
                this.graph.AddEdge(edge = new GcTypeEdge(source, target));
            }
            edge.Count++;
        }
예제 #3
0
 private void FlushUnresolvedMembers()
 {
     foreach (GcMember member in this.unresolvedMembers)
     {
         GcType target = member.Referer;
         GcType source;
         if (this.objectTypes.TryGetValue(member.Address, out source))
         {
             this.AddTypeEdge(source, target);
         }
     }
     this.unresolvedMembers.Clear();
 }
예제 #4
0
        public GcObjectVertex AddVertex(
            GcType type,
            long address,
            int size
            )
        {
            GcObjectVertex v = new GcObjectVertex(
                type,
                address,
                size);

            this.AddVertex(v);
            return(v);
        }
예제 #5
0
 public GcObjectVertex(
     GcType type,
     long address,
     int size,
     string kind,
     int gen,
     string value
     )
 {
     this.type    = type;
     this.address = address;
     this.size    = size;
     this.kind    = kind;
     this.gen     = gen;
     this.value   = value;
 }
예제 #6
0
 public GcMember(GcType referer, int address)
 {
     this.Referer = referer;
     this.Address = address;
 }