Пример #1
0
 private void RemoveUnreachableBlocks()
 {
     V_0 = new HashSet <InstructionBlock>();
     V_1 = this.theCFG.get_Blocks();
     V_2 = 0;
     while (V_2 < (int)V_1.Length)
     {
         V_3 = V_1[V_2];
         if (!this.reachableBlocks.Contains(V_3))
         {
             V_3.set_Successors(new InstructionBlock[0]);
             dummyVar0 = V_0.Add(V_3);
         }
         V_2 = V_2 + 1;
     }
     if (V_0.get_Count() > 0)
     {
         this.decompilationContext.get_MethodContext().set_IsMethodBodyChanged(true);
     }
     V_4 = 0;
     while (V_4 < this.theCFG.get_RawExceptionHandlers().get_Count())
     {
         V_5 = this.theCFG.get_RawExceptionHandlers().get_Item(V_4);
         if (V_0.Contains(this.theCFG.get_InstructionToBlockMapping().get_Item(V_5.get_TryStart().get_Offset())))
         {
             stackVariable54 = V_4;
             V_4             = stackVariable54 - 1;
             this.theCFG.get_RawExceptionHandlers().RemoveAt(stackVariable54);
         }
         V_4 = V_4 + 1;
     }
     V_6 = V_0.GetEnumerator();
     try
     {
         while (V_6.MoveNext())
         {
             V_7 = V_6.get_Current();
             this.theCFG.RemoveBlockAt(V_7.get_Index());
         }
     }
     finally
     {
         ((IDisposable)V_6).Dispose();
     }
     return;
 }