Пример #1
0
 private static void AllEdgesFrom(BasicBlock bb, ISeq <BBEdge> edges, Set <BasicBlock> visited)
 {
     if (!visited.Contains(bb))
     {
         visited.Add(bb);
         foreach (var t in bb.Targets)
         {
             var edge = new BBEdge {
                 Source = bb, Target = t
             };
             edges.Add(edge);
             AllEdgesFrom(t, edges, visited);
         }
     }
 }
Пример #2
0
 private static void AllEdgesFrom(BasicBlock bb, ISeq<BBEdge> edges, Set<BasicBlock> visited)
 {
     if (!visited.Contains(bb))
     {
         visited.Add(bb);
         foreach (var t in bb.Targets)
         {
             var edge = new BBEdge { Source = bb, Target = t };
             edges.Add(edge);
             AllEdgesFrom(t, edges, visited);
         }
     }
 }