예제 #1
0
        public void AddBranch(FleeIlGenerator ilg, Label target)
        {
            var startLoc = new IlLocation(ilg.Length);
            var bi       = new BranchInfo(startLoc, target);

            this.myBranchInfos.Add(bi);
        }
예제 #2
0
 private void FindBetweenBranches(BranchInfo target, ICollection <BranchInfo> dest)
 {
     this.myBranchInfos.Each(m =>
     {
         if (m.IsBetween(target))
         {
             dest.Add(m);
         }
     });
     //try
     //{
     //    var enumerator = this.myBranchInfos.GetEnumerator();
     //    while (enumerator.MoveNext())
     //    {
     //        var bi = enumerator.Current;
     //        var flag = bi.IsBetween(target);
     //        if (flag)
     //        {
     //            dest.Add(bi);
     //        }
     //    }
     //}
     //finally
     //{
     //    IEnumerator<BranchInfo> enumerator;
     //    if (enumerator != null)
     //    {
     //        enumerator.Dispose();
     //    }
     //}
 }
예제 #3
0
        public bool IsLongBranch(FleeIlGenerator ilg, Label target)
        {
            var startLoc = new IlLocation(ilg.Length);
            var bi       = new BranchInfo(startLoc, target);
            var index    = this.myBranchInfos.IndexOf(bi);

            bi = this.myBranchInfos[index];
            return(bi.IsLongBranch);
        }