Пример #1
0
 protected override void OnPhiVariableUsed(int instructionOffset, ClassHierarchyNode variableNode)
 {
     V_0 = this.offsetToInstruction.get_Item(instructionOffset);
     if (V_0.get_OpCode().get_Code() == 36 || V_0.get_OpCode().get_Code() == 37)
     {
         return;
     }
     V_1 = this.GetUseExpressionTypeNode(V_0, variableNode.get_Variable());
     if (V_0.get_OpCode().get_Code() == 68)
     {
         variableNode.AddSupertype(V_1);
         dummyVar0 = this.resultingGraph.Add(V_1);
         return;
     }
     if (!String.op_Equality(V_1.get_NodeType().get_FullName(), "System.Int32") || !this.OnlyPhiVariablesUsed(this.offsetToExpression.get_Item(V_0.get_Offset())))
     {
         variableNode.AddSupertype(V_1);
         dummyVar2 = this.resultingGraph.Add(V_1);
         return;
     }
     V_3 = this.GetUsedPhiVariableNodes(V_0.get_Offset());
     V_4 = 0;
     while (V_4 < V_3.get_Count())
     {
         V_5 = V_4 + 1;
         while (V_5 < V_3.get_Count())
         {
             V_3.get_Item(V_4).AddSupertype(V_3.get_Item(V_5));
             V_3.get_Item(V_5).AddSupertype(V_3.get_Item(V_4));
             V_5 = V_5 + 1;
         }
         V_4 = V_4 + 1;
     }
     if (this.IsArithmeticOperation(V_0.get_OpCode().get_Code()))
     {
         V_6 = 0;
         while (V_6 < V_3.get_Count())
         {
             dummyVar1 = this.notPossibleBooleanNodes.Add(V_3.get_Item(V_6));
             V_7       = this.GetTypeNode(this.typeSystem.get_Int32());
             if (!V_7.get_CanAssignTo().Contains(V_3.get_Item(V_6)))
             {
                 V_7.get_CanAssignTo().Add(V_3.get_Item(V_6));
                 V_3.get_Item(V_6).get_SubTypes().Add(V_7);
             }
             V_6 = V_6 + 1;
         }
     }
     return;
 }
Пример #2
0
 private void RedirectConstraints()
 {
     V_0 = new List <KeyValuePair <ClassHierarchyNode, ClassHierarchyNode> >();
     V_1 = this.get_ContainedNodes().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_3 = V_2.get_CanAssignTo().GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_4 = V_3.get_Current();
                     if (this.get_ContainedNodes().Contains(V_4))
                     {
                         continue;
                     }
                     if (!V_4.get_IsHardNode() || !V_4.get_NodeType().get_IsPrimitive() || !V_2.get_IsHardNode() || this.IsAssignable(V_2.get_NodeType(), V_4.get_NodeType()))
                     {
                         V_0.Add(new KeyValuePair <ClassHierarchyNode, ClassHierarchyNode>(V_2, V_4));
                     }
                     else
                     {
                         dummyVar0 = V_4.get_SubTypes().Remove(V_2);
                     }
                 }
             }
             finally
             {
                 if (V_3 != null)
                 {
                     V_3.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     V_5 = V_0.GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_6 = V_5.get_Current();
             V_7 = V_6.get_Key();
             V_8 = V_6.get_Value();
             this.get_CanAssignTo().Add(V_8);
             dummyVar1 = V_7.get_CanAssignTo().Remove(V_8);
             dummyVar2 = V_8.get_SubTypes().Remove(V_7);
             if (V_8.get_SubTypes().Contains(this))
             {
                 continue;
             }
             V_8.get_SubTypes().Add(this);
         }
     }
     finally
     {
         ((IDisposable)V_5).Dispose();
     }
     V_0 = new List <KeyValuePair <ClassHierarchyNode, ClassHierarchyNode> >();
     V_1 = this.get_ContainedNodes().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_9 = V_1.get_Current();
             V_3 = V_9.get_SubTypes().GetEnumerator();
             try
             {
                 while (V_3.MoveNext())
                 {
                     V_10 = V_3.get_Current();
                     if (this.get_ContainedNodes().Contains(V_10))
                     {
                         continue;
                     }
                     if (!V_10.get_IsHardNode() || !V_10.get_NodeType().get_IsPrimitive() || !V_9.get_IsHardNode() || this.IsAssignable(V_10.get_NodeType(), V_9.get_NodeType()))
                     {
                         V_0.Add(new KeyValuePair <ClassHierarchyNode, ClassHierarchyNode>(V_9, V_10));
                     }
                     else
                     {
                         dummyVar3 = V_10.get_CanAssignTo().Remove(V_9);
                     }
                 }
             }
             finally
             {
                 if (V_3 != null)
                 {
                     V_3.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     V_5 = V_0.GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_11 = V_5.get_Current();
             V_12 = V_11.get_Key();
             V_13 = V_11.get_Value();
             this.get_SubTypes().Add(V_13);
             dummyVar4 = V_12.get_SubTypes().Remove(V_13);
             dummyVar5 = V_13.get_CanAssignTo().Remove(V_12);
             if (V_13.get_CanAssignTo().Contains(this))
             {
                 continue;
             }
             V_13.get_CanAssignTo().Add(this);
         }
     }
     finally
     {
         ((IDisposable)V_5).Dispose();
     }
     return;
 }