Ejemplo n.º 1
0
 public static void AddILRangesToInstruction(ILNode nodeToAddTo, ILNode prev, ILNode next, ILBlockBase block, ILNode removed)
 {
     Debug.Assert(nodeToAddTo == prev || nodeToAddTo == next || nodeToAddTo == block);
     if (nodeToAddTo != null)
     {
         if (nodeToAddTo == prev && prev.SafeToAddToEndILRanges)
         {
             removed.AddSelfAndChildrenRecursiveILRanges(prev.EndILRanges);
             return;
         }
         else if (nodeToAddTo != null && nodeToAddTo == next)
         {
             removed.AddSelfAndChildrenRecursiveILRanges(next.ILRanges);
             return;
         }
     }
     AddILRangesTryNextFirst(prev, next, block, removed);
 }
Ejemplo n.º 2
0
 public static void AddILRangesTryPreviousFirst(ILNode prev, ILNode next, ILBlockBase block, ILNode removed)
 {
     if (prev != null && prev.SafeToAddToEndILRanges)
     {
         removed.AddSelfAndChildrenRecursiveILRanges(prev.EndILRanges);
     }
     else if (next != null)
     {
         removed.AddSelfAndChildrenRecursiveILRanges(next.ILRanges);
     }
     else if (prev != null)
     {
         removed.AddSelfAndChildrenRecursiveILRanges(block.EndILRanges);
     }
     else
     {
         removed.AddSelfAndChildrenRecursiveILRanges(block.ILRanges);
     }
 }