Beispiel #1
0
 internal void FlowsTo(VariableAnalysis.Block next)
 {
     if (this._successors.IndexOf(next) < 0)
     {
         this._successors.Add(next);
         next._predecessors.Add(this);
     }
 }
Beispiel #2
0
 private static void VisitDepthFirstOrder(VariableAnalysis.Block block, List <VariableAnalysis.Block> visitData)
 {
     if (!object.ReferenceEquals(block._visitData, visitData))
     {
         block._visitData = visitData;
         foreach (VariableAnalysis.Block block2 in block._successors)
         {
             VisitDepthFirstOrder(block2, visitData);
         }
         visitData.Add(block);
     }
 }
Beispiel #3
0
 internal LoopGotoTargets(string label, VariableAnalysis.Block breakTarget, VariableAnalysis.Block continueTarget)
 {
     this.Label          = label;
     this.BreakTarget    = breakTarget;
     this.ContinueTarget = continueTarget;
 }
Beispiel #4
0
            internal static List <VariableAnalysis.Block> GenerateReverseDepthFirstOrder(VariableAnalysis.Block block)
            {
                List <VariableAnalysis.Block> visitData = new List <VariableAnalysis.Block>();

                VisitDepthFirstOrder(block, visitData);
                visitData.Reverse();
                visitData.ForEach(delegate(VariableAnalysis.Block b) {
                    b._visitData = null;
                });
                return(visitData);
            }