コード例 #1
0
 private void AddBlocks(List <ILBlock.InstructionPair> allBranches)
 {
     V_0 = allBranches.get_Count() - 1;
     while (V_0 >= 0)
     {
         V_1 = allBranches.get_Item(V_0).get_FirstInstruction().get_Offset() + allBranches.get_Item(V_0).get_FirstInstruction().GetSize();
         V_2 = allBranches.get_Item(V_0).get_SecondInstruction().get_Offset();
         if (V_2 < V_1)
         {
             V_3 = null;
             V_4 = allBranches.get_Item(V_0).get_SecondInstruction().get_Previous();
             if (V_4 != null && !OpCodeInfo.IsUnconditionalBranch(V_4.get_OpCode()))
             {
                 V_3 = allBranches.get_Item(V_0).get_SecondInstruction();
             }
             V_5 = false;
             V_6 = allBranches.GetEnumerator();
             try
             {
                 while (V_6.MoveNext())
                 {
                     V_7 = V_6.get_Current();
                     if (V_7.get_FirstInstruction().get_Offset() >= V_2 && V_7.get_FirstInstruction().get_Offset() < V_1 || V_2 > V_7.get_SecondInstruction().get_Offset() || V_7.get_SecondInstruction().get_Offset() >= V_1)
                     {
                         continue;
                     }
                     if (V_3 != null)
                     {
                         if ((object)V_7.get_SecondInstruction() == (object)V_3)
                         {
                             continue;
                         }
                         V_5 = true;
                     }
                     else
                     {
                         V_3 = V_7.get_SecondInstruction();
                     }
                 }
             }
             finally
             {
                 ((IDisposable)V_6).Dispose();
             }
             if (!V_5)
             {
                 dummyVar0 = this.AddNestedBlock(new ILBlock(1, V_2, V_1, V_3));
             }
         }
         V_0 = V_0 - 1;
     }
     return;
 }
コード例 #2
0
 private void MapBranches(Expression expression)
 {
     V_0 = new List <Instruction>(expression.get_UnderlyingSameMethodInstructions());
     V_1 = new List <Instruction>();
     V_2 = V_0.get_Count();
     V_3 = 0;
     while (V_3 < V_2)
     {
         V_4 = V_0.get_Item(V_3);
         V_6 = V_4.get_OpCode().get_FlowControl();
         if (V_6 != null && V_6 != 3 && V_6 - 7 > 1)
         {
             V_5 = V_4.get_Next();
             if (V_5 != null && !this.mappedInstructions.Contains(V_5) && V_3 == V_0.get_Count() - 1 || (object)V_5 != (object)V_0.get_Item(V_3 + 1) && this.IsUnconditionalBranch(V_5) && !this.methodContext.get_ControlFlowGraph().get_InstructionToBlockMapping().ContainsKey(V_5.get_Offset()))
             {
                 V_1.Add(V_5);
             }
         }
         V_3 = V_3 + 1;
     }
     this.mappedInstructions.UnionWith(V_1);
     expression.MapBranchInstructions(V_1);
     return;
 }