示例#1
0
        public ISeq <LeaveTryBasicBlock> LeaveTrys()
        {
            var acc     = new Seq <LeaveTryBasicBlock>();
            var visited = new Set <BasicBlock>();

            Body.AccumLeaveTrys(visited, acc, 0);
            foreach (var h in Handlers)
            {
                h.AccumLeaveTrys(visited, acc, 0);
            }
            return(acc);
        }
示例#2
0
 public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth)
 {
     if (!visited.Contains(this))
     {
         visited.Add(this);
         Target.AccumLeaveTrys(visited, acc, depth);
     }
 }
示例#3
0
 public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth)
 {
     if (!visited.Contains(this))
     {
         visited.Add(this);
         // Remember, this basic block is for 'leaves' which don't acutally leave any try context,
         // in other words are just a fancy way of emptying the stack.
         Target.AccumLeaveTrys(visited, acc, depth);
     }
 }
示例#4
0
 public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth)
 {
     if (!visited.Contains(this))
     {
         visited.Add(this);
         foreach (var bb in CaseTargets)
         {
             bb.AccumLeaveTrys(visited, acc, depth);
         }
         Fallthrough.AccumLeaveTrys(visited, acc, depth);
     }
 }
示例#5
0
 public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth)
 {
     if (!visited.Contains(this))
     {
         visited.Add(this);
         depth -= HandlerPopCount;
         if (depth >= 0)
         {
             Target.AccumLeaveTrys(visited, acc, depth);
         }
     }
 }
示例#6
0
 public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth)
 {
     if (!visited.Contains(this))
     {
         visited.Add(this);
         if (depth == 0)
         {
             // Only include leave's from the try we started from, not inner trys
             acc.Add(this);
         }
         else
         {
             depth -= HandlerPopCount;
             if (depth >= 0)
             {
                 Target.AccumLeaveTrys(visited, acc, depth);
             }
         }
     }
 }
示例#7
0
 public void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth)
 {
     Body.AccumLeaveTrys(visited, acc, depth);
 }