Ejemplo n.º 1
0
 private ConditionLogicalConstruct CreateComplexCondition(ConditionLogicalConstruct conditionNode)
 {
     V_0       = conditionNode.get_ConditionExpression();
     V_1       = new HashSet <ILogicalConstruct>();
     V_2       = conditionNode;
     dummyVar0 = V_1.Add(V_2);
     V_3       = V_2.get_TrueSuccessor();
     V_4       = V_2.get_FalseSuccessor();
     while (true)
     {
         if (!this.CanBePartOfComplexCondition(V_3, V_1, V_2.get_FalseCFGSuccessor()))
         {
             if (!this.CanBePartOfComplexCondition(V_4, V_1, V_2.get_TrueCFGSuccessor()))
             {
                 break;
             }
             V_6 = V_4 as ConditionLogicalConstruct;
             if (V_6.get_TrueSuccessor() != V_3)
             {
                 V_6.Negate(this.typeSystem);
             }
             V_8 = 11;
         }
         else
         {
             V_6 = V_3 as ConditionLogicalConstruct;
             if (V_6.get_FalseSuccessor() != V_4)
             {
                 V_6.Negate(this.typeSystem);
             }
             V_8 = 12;
         }
         V_0 = new BinaryExpression(V_8, V_0, V_6.get_ConditionExpression(), this.typeSystem, null, false);
         V_0.set_ExpressionType(this.booleanTypeReference);
         V_2       = V_6;
         V_3       = V_2.get_TrueSuccessor();
         V_4       = V_2.get_FalseSuccessor();
         dummyVar1 = V_1.Add(V_2);
     }
     if (V_1.get_Count() == 1)
     {
         return(conditionNode);
     }
     V_5 = new HashSet <ConditionLogicalConstruct>();
     V_9 = V_1.GetEnumerator();
     try
     {
         while (V_9.MoveNext())
         {
             V_10      = (ConditionLogicalConstruct)V_9.get_Current();
             dummyVar2 = V_5.Add(V_10);
         }
     }
     finally
     {
         ((IDisposable)V_9).Dispose();
     }
     return(new ConditionLogicalConstruct(conditionNode, V_2, V_5, V_0));
 }
Ejemplo n.º 2
0
 public ConditionLogicalConstruct(ConditionLogicalConstruct entry, ConditionLogicalConstruct lastNode, HashSet <ConditionLogicalConstruct> body, Expression conditionExpression)
 {
     base();
     this.set_Entry(entry.get_FirstBlock());
     this.set_TrueCFGSuccessor(lastNode.get_TrueCFGSuccessor());
     this.set_FalseCFGSuccessor(lastNode.get_FalseCFGSuccessor());
     this.set_ConditionExpression(conditionExpression);
     this.RedirectChildrenToNewParent(this.RestoreOriginalCFGNodes(body));
     this.AddTrueFalseSuccessors();
     this.set_LogicalContainer(null);
     return;
 }