private void RemoveTransitiveEdges()
 {
     V_0 = this.GenerateNodeToIndex();
     V_1 = this.GeenrateAdjacencyMatrix(V_0);
     this.WarsawTransitiveClosure(V_1);
     V_2 = this.inferenceGraph.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             V_4 = this.inferenceGraph.GetEnumerator();
             try
             {
                 while (V_4.MoveNext())
                 {
                     V_5 = V_4.get_Current();
                     V_6 = this.inferenceGraph.GetEnumerator();
                     try
                     {
                         while (V_6.MoveNext())
                         {
                             V_7  = V_6.get_Current();
                             V_8  = V_0.get_Item(V_3);
                             V_9  = V_0.get_Item(V_5);
                             V_10 = V_0.get_Item(V_7);
                             if (!V_1[V_8, V_9] || !V_1[V_9, V_10] || V_3.get_IsHardNode() && V_7.get_IsHardNode() || !V_3.get_SubTypes().Contains(V_7))
                             {
                                 continue;
                             }
                             this.RemoveSubtype(V_3, V_7);
                         }
                     }
                     finally
                     {
                         if (V_6 != null)
                         {
                             V_6.Dispose();
                         }
                     }
                 }
             }
             finally
             {
                 if (V_4 != null)
                 {
                     V_4.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return;
 }
Exemple #2
0
 private List <IntervalConstruct> SortIntervalList(List <IntervalConstruct> intervals)
 {
     V_0 = new IntervalConstruct(intervals.get_Item(0));
     V_2 = intervals.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3       = V_2.get_Current();
             dummyVar0 = V_0.get_Children().Add(V_3);
         }
     }
     finally
     {
         ((IDisposable)V_2).Dispose();
     }
     stackVariable15 = DFSTBuilder.BuildTree(V_0);
     V_1             = new List <IntervalConstruct>();
     V_4             = stackVariable15.get_ReversePostOrder().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             V_1.Add(V_5.get_Construct() as IntervalConstruct);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return(V_1);
 }
 private ICollection <DFSTNode> ExpandLoopBodyWithCrossEdges(ICollection <DFSTNode> nodesInLoop)
 {
     V_0 = new HashSet <DFSTNode>(nodesInLoop);
     V_1 = new Queue <DFSTNode>(nodesInLoop);
     while (V_1.get_Count() > 0)
     {
         V_2 = V_1.Dequeue();
         V_4 = V_2.get_CrossEdgePredecessors().GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5 = V_4.get_Current();
                 if (V_0.Contains(V_5))
                 {
                     continue;
                 }
                 dummyVar0 = V_0.Add(V_5);
                 V_1.Enqueue(V_5);
             }
         }
         finally
         {
             ((IDisposable)V_4).Dispose();
         }
         V_3 = V_2.get_Predecessor() as DFSTNode;
         if (V_3 == null || V_0.Contains(V_3))
         {
             continue;
         }
         dummyVar1 = V_0.Add(V_3);
         V_1.Enqueue(V_3);
     }
     return(V_0);
 }
Exemple #4
0
 public HashSet <ISingleEntrySubGraph> GetDominatedNodes(ISingleEntrySubGraph construct)
 {
     if (!this.constructToNodeMap.TryGetValue(construct, out V_0))
     {
         return(null);
     }
     V_1 = new HashSet <ISingleEntrySubGraph>();
     V_2 = new Queue <DTNode>();
     V_2.Enqueue(V_0);
     while (V_2.get_Count() > 0)
     {
         V_3       = V_2.Dequeue();
         dummyVar0 = V_1.Add(V_3.get_Construct());
         V_4       = V_3.get_TreeEdgeSuccessors().GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5 = (DTNode)V_4.get_Current();
                 V_2.Enqueue(V_5);
             }
         }
         finally
         {
             ((IDisposable)V_4).Dispose();
         }
     }
     return(V_1);
 }
 private LetClause GenerateLetClause(Dictionary <PropertyDefinition, Expression> propertyToValueMap, VariableReference oldIdentifier)
 {
     V_0 = null;
     V_1 = null;
     V_4 = propertyToValueMap.GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (!String.op_Equality(V_5.get_Key().get_Name(), oldIdentifier.get_Name()) || V_5.get_Value().get_CodeNodeType() != 26 || (object)(V_5.get_Value() as VariableReferenceExpression).get_Variable() != (object)oldIdentifier)
             {
                 V_1 = V_5.get_Key();
             }
             else
             {
                 V_0 = V_5.get_Key();
             }
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     if (V_0 == null || V_1 == null)
     {
         return(null);
     }
     V_2 = propertyToValueMap.get_Item(V_1);
     V_3 = new LetClause(new VariableReferenceExpression(this.CreateNewIdentifier(V_1.get_Name(), V_2.get_ExpressionType()), null), V_2, null);
     propertyToValueMap.set_Item(V_1, V_3.get_Identifier());
     return(V_3);
 }
Exemple #6
0
		public override RepositoryResponse<bool> SaveSubModels(MixPage parent, MixCmsContext _context = null, IDbContextTransaction _transaction = null)
		{
			stackVariable0 = new RepositoryResponse<bool>();
			stackVariable0.set_IsSucceed(true);
			V_0 = stackVariable0;
			ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixTemplates.UpdateViewModel>(this.get_View().SaveModel(true, _context, _transaction), ref V_0);
			if (V_0.get_IsSucceed() && this.get_Master() != null)
			{
				ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixTemplates.UpdateViewModel>(this.get_Master().SaveModel(true, _context, _transaction), ref V_0);
			}
			if (V_0.get_IsSucceed() && this.get_UrlAliases() != null)
			{
				V_1 = this.get_UrlAliases().GetEnumerator();
				try
				{
					while (V_1.MoveNext())
					{
						V_2 = V_1.get_Current();
						if (!V_0.get_IsSucceed())
						{
							break;
						}
						V_2.set_SourceId(parent.get_Id().ToString());
						V_2.set_Type(0);
						V_2.set_Specificulture(this.get_Specificulture());
						ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixUrlAliases.UpdateViewModel>(V_2.SaveModel(false, _context, _transaction), ref V_0);
					}
				}
				finally
				{
					((IDisposable)V_1).Dispose();
				}
			}
			if (V_0.get_IsSucceed())
			{
				V_4 = this.get_ModuleNavs().GetEnumerator();
				try
				{
					while (V_4.MoveNext())
					{
						V_5 = V_4.get_Current();
						V_5.set_PageId(parent.get_Id());
						if (!V_5.get_IsActived())
						{
							ViewModelHelper.HandleResult<MixPageModule>(V_5.RemoveModel(false, _context, _transaction), ref V_0);
						}
						else
						{
							ViewModelHelper.HandleResult<Mix.Cms.Lib.ViewModels.MixPageModules.ReadMvcViewModel>(V_5.SaveModel(false, _context, _transaction), ref V_0);
						}
					}
				}
				finally
				{
					((IDisposable)V_4).Dispose();
				}
			}
			return V_0;
		}
 private Dictionary <ILogicalConstruct, HashSet <ISingleEntrySubGraph> > GetValidCases(DominatorTree dominatorTree, ILogicalConstruct switchCFGBlock)
 {
     V_0 = new SwitchBuilder.u003cu003ec__DisplayClass9_0();
     V_0.caseEntriesToDominatedNodesMap = new Dictionary <ILogicalConstruct, HashSet <ISingleEntrySubGraph> >();
     V_1       = new HashSet <ISingleEntrySubGraph>();
     dummyVar0 = V_1.Add(switchCFGBlock);
     V_4       = switchCFGBlock.get_SameParentSuccessors().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = (ILogicalConstruct)V_4.get_Current();
             if (V_5 == switchCFGBlock || dominatorTree.GetImmediateDominator(V_5) != switchCFGBlock)
             {
                 continue;
             }
             V_6 = dominatorTree.GetDominatedNodes(V_5);
             V_0.caseEntriesToDominatedNodesMap.Add(V_5, V_6);
             V_1.UnionWith(V_6);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     stackVariable34 = DFSTBuilder.BuildTree(switchCFGBlock.get_Parent(), switchCFGBlock).get_ReversePostOrder();
     stackVariable35 = SwitchBuilder.u003cu003ec.u003cu003e9__9_0;
     if (stackVariable35 == null)
     {
         dummyVar1       = stackVariable35;
         stackVariable35 = new Func <DFSTNode, ILogicalConstruct>(SwitchBuilder.u003cu003ec.u003cu003e9.u003cGetValidCasesu003eb__9_0);
         SwitchBuilder.u003cu003ec.u003cu003e9__9_0 = stackVariable35;
     }
     V_2 = new List <ILogicalConstruct>(stackVariable34.Select <DFSTNode, ILogicalConstruct>(stackVariable35).Where <ILogicalConstruct>(new Func <ILogicalConstruct, bool>(V_0.u003cGetValidCasesu003eb__1)));
     do
     {
         V_3 = false;
         V_7 = V_2.GetEnumerator();
         try
         {
             while (V_7.MoveNext())
             {
                 V_8 = V_7.get_Current();
                 if (!V_0.caseEntriesToDominatedNodesMap.TryGetValue(V_8, out V_9) || this.IsCaseValid(V_8, V_1))
                 {
                     continue;
                 }
                 V_1.ExceptWith(V_9);
                 dummyVar2 = V_0.caseEntriesToDominatedNodesMap.Remove(V_8);
                 V_3       = true;
             }
         }
         finally
         {
             ((IDisposable)V_7).Dispose();
         }
     }while (V_3);
     return(V_0.caseEntriesToDominatedNodesMap);
 }
        public void InferTypes()
        {
            V_0 = (new GreedyTypeInferer(this.context, this.offsetToExpression)).InferTypes();
            V_1 = new ClassHierarchyBuilder(this.offsetToExpression, this.context.get_MethodContext().get_ControlFlowGraph().get_OffsetToInstruction(), this.context);
            this.inferenceGraph = V_1.BuildHierarchy(V_0);
            this.MergeConnectedComponents();
            this.RemoveTransitiveEdges();
            this.ProcessSingleConstraints();
            V_2 = null;
            V_4 = this.inferenceGraph.GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_5 = V_4.get_Current();
                    if (!V_5.get_IsHardNode() || !String.op_Equality(V_5.get_NodeType().get_FullName(), "System.Object"))
                    {
                        continue;
                    }
                    V_2 = V_5;
                    goto Label0;
                }
            }
            finally
            {
                if (V_4 != null)
                {
                    V_4.Dispose();
                }
            }
Label0:
            V_3 = new List <ClassHierarchyNode>();
            V_3.Add(V_2);
            V_4 = this.inferenceGraph.GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_6 = V_4.get_Current();
                    if (V_6.get_IsHardNode())
                    {
                        continue;
                    }
                    V_3.Add(V_6);
                }
            }
            finally
            {
                if (V_4 != null)
                {
                    V_4.Dispose();
                }
            }
            this.MergeNodes(V_3);
            this.InferIntegerTypes(V_0);
            this.AddCasts();
            return;
        }
Exemple #9
0
 public List <FileViewModel> GetFilesWithContent(string fullPath)
 {
     this.CreateDirectoryIfNotExist(fullPath);
     V_0 = new List <FileViewModel>();
     V_1 = Directory.GetDirectories(fullPath, "*", 1);
     V_2 = 0;
     while (V_2 < (int)V_1.Length)
     {
         stackVariable15 = new DirectoryInfo(V_1[V_2]);
         V_3             = stackVariable15.get_Name();
         stackVariable17 = stackVariable15.GetFiles();
         stackVariable18 = FileRepository.u003cu003ec.u003cu003e9__29_0;
         if (stackVariable18 == null)
         {
             dummyVar0       = stackVariable18;
             stackVariable18 = new Func <FileInfo, DateTime>(FileRepository.u003cu003ec.u003cu003e9.u003cGetFilesWithContentu003eb__29_0);
             FileRepository.u003cu003ec.u003cu003e9__29_0 = stackVariable18;
         }
         V_4 = ((IEnumerable <FileInfo>)stackVariable17).OrderByDescending <FileInfo, DateTime>(stackVariable18).GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5 = V_4.get_Current();
                 V_6 = V_5.OpenText();
                 try
                 {
                     V_7 = new FileViewModel();
                     V_7.set_FolderName(V_3);
                     stackVariable33    = new string[2];
                     stackVariable33[0] = fullPath;
                     stackVariable33[1] = V_3;
                     V_7.set_FileFolder(CommonHelper.GetFullPath(stackVariable33));
                     V_7.set_Filename(V_5.get_Name().Substring(0, V_5.get_Name().LastIndexOf('.')));
                     V_7.set_Extension(V_5.get_Extension());
                     V_7.set_Content(V_6.ReadToEnd());
                     V_0.Add(V_7);
                 }
                 finally
                 {
                     if (V_6 != null)
                     {
                         ((IDisposable)V_6).Dispose();
                     }
                 }
             }
         }
         finally
         {
             if (V_4 != null)
             {
                 V_4.Dispose();
             }
         }
         V_2 = V_2 + 1;
     }
     return(V_0);
 }
Exemple #10
0
 private void CreateGraph(IEnumerable <IntervalConstruct> intervals)
 {
     V_0 = intervals.GetEnumerator();
     try
     {
         while (V_0.MoveNext())
         {
             V_1 = V_0.get_Current();
             V_2 = V_1.get_Children().GetEnumerator();
             try
             {
                 while (V_2.MoveNext())
                 {
                     V_3 = (ILogicalConstruct)V_2.get_Current();
                     V_4 = this.GetNodeSuccessors(V_3).GetEnumerator();
                     try
                     {
                         while (V_4.MoveNext())
                         {
                             V_5 = V_4.get_Current();
                             if (!this.nodeToInterval.ContainsKey(V_5) || this.nodeToInterval.get_Item(V_5) == V_1)
                             {
                                 continue;
                             }
                             V_6 = this.nodeToInterval.get_Item(V_5);
                             if (V_1.get_SameParentSuccessors().Contains(V_6))
                             {
                                 continue;
                             }
                             dummyVar0 = V_1.get_SameParentSuccessors().Add(V_6);
                             dummyVar1 = V_6.get_SameParentPredecessors().Add(V_1);
                         }
                     }
                     finally
                     {
                         if (V_4 != null)
                         {
                             V_4.Dispose();
                         }
                     }
                 }
             }
             finally
             {
                 ((IDisposable)V_2).Dispose();
             }
         }
     }
     finally
     {
         if (V_0 != null)
         {
             V_0.Dispose();
         }
     }
     return;
 }
Exemple #11
0
 public int WriteParameterAttributes(ParameterDefinition parameter, bool isWinRTMethodImplementation)
 {
     if (isWinRTMethodImplementation)
     {
         stackVariable1 = null;
     }
     else
     {
         stackVariable1 = this.GetInAttribute(parameter);
     }
     V_0 = stackVariable1;
     if (isWinRTMethodImplementation)
     {
         stackVariable3 = null;
     }
     else
     {
         stackVariable3 = this.GetOutAttribute(parameter);
     }
     V_1 = stackVariable3;
     V_2 = new List <CustomAttribute>();
     if (V_0 != null)
     {
         V_2.Add(V_0);
     }
     if (V_1 != null)
     {
         V_2.Add(V_1);
     }
     V_2.AddRange(parameter.get_CustomAttributes());
     V_3 = 0;
     V_4 = V_2.GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (this.attributesNotToShow.Contains(V_5.get_AttributeType().get_FullName()))
             {
                 continue;
             }
             if (V_3 != 0)
             {
                 this.genericWriter.Write(this.get_ParameterAttributeSeparator());
             }
             this.WriteAttribute(V_5, true, false);
             V_3 = V_3 + 1;
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return(V_3);
 }
Exemple #12
0
 public void MergeNodes(HashSet <ISingleEntrySubGraph> constructs, ISingleEntrySubGraph originalEntry, ISingleEntrySubGraph newConstruct)
 {
     V_0            = this.constructToNodeMap.get_Item(originalEntry);
     stackVariable5 = new DTNode(newConstruct);
     stackVariable5.set_Predecessor(V_0.get_Predecessor());
     V_1 = stackVariable5;
     V_1.get_DominanceFrontier().UnionWith(V_0.get_DominanceFrontier());
     dummyVar0 = V_1.get_DominanceFrontier().Remove(V_0);
     if (V_1.get_Predecessor() != null)
     {
         dummyVar1 = V_1.get_Predecessor().get_TreeEdgeSuccessors().Remove(V_0);
         dummyVar2 = V_1.get_Predecessor().get_TreeEdgeSuccessors().Add(V_1);
     }
     V_2 = constructs.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3       = V_2.get_Current();
             dummyVar3 = this.constructToNodeMap.Remove(V_3);
         }
     }
     finally
     {
         ((IDisposable)V_2).Dispose();
     }
     V_4 = this.constructToNodeMap.GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (V_5.get_Value().get_Predecessor() != null && constructs.Contains(V_5.get_Value().get_Predecessor().get_Construct()))
             {
                 V_5.get_Value().set_Predecessor(V_1);
                 dummyVar4 = V_1.get_TreeEdgeSuccessors().Add(V_5.get_Value());
             }
             if (!V_5.get_Value().get_DominanceFrontier().Remove(V_0))
             {
                 continue;
             }
             dummyVar5 = V_5.get_Value().get_DominanceFrontier().Add(V_1);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     if (this.get_RootConstruct() == originalEntry)
     {
         this.set_RootConstruct(newConstruct);
     }
     this.constructToNodeMap.Add(newConstruct, V_1);
     return;
 }
        private bool RemoveStateSavingBlocks()
        {
            V_0 = this.theCFG.get_Blocks()[(int)this.theCFG.get_Blocks().Length - 1];
            V_1 = V_0.get_First();
            while (V_1.get_OpCode().get_Code() == null && (object)V_1 != (object)V_0.get_Last())
            {
                V_1 = V_1.get_Next();
            }
            if (V_1.get_OpCode().get_Code() != 41)
            {
                return(false);
            }
            V_2 = 0;
            V_4 = (new HashSet <InstructionBlock>(V_0.get_Predecessors())).GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_5 = V_4.get_Current();
                    if ((int)V_5.get_Successors().Length <= 1)
                    {
                        if (V_5.get_Predecessors().get_Count() != 1 || !InstructionBlock.op_Inequality(this.theCFG.get_Blocks()[(int)this.theCFG.get_Blocks().Length - 2], V_5))
                        {
                            V_5.set_Successors(new InstructionBlock[0]);
                            V_2 = V_2 + 1;
                        }
                        else
                        {
                            if (this.CheckForStateFieldSet(V_5) && this.TryRemoveStateSavingBlock(V_5))
                            {
                                continue;
                            }
                            V_6 = false;
                            goto Label1;
                        }
                    }
                    else
                    {
                        V_6 = false;
                        goto Label1;
                    }
                }
                goto Label0;
            }
            finally
            {
                ((IDisposable)V_4).Dispose();
            }
Label1:
            return(V_6);

Label0:
            dummyVar0 = this.toBeRemoved.Add(V_0);
            return(V_2 == 2);
        }
        public IEnumerable <ICollection <ClassHierarchyNode> > GetConnectedComponents()
        {
            do
            {
                V_0 = null;
                V_2 = this.inferenceGraph.GetEnumerator();
                try
                {
                    while (V_2.MoveNext())
                    {
                        V_3 = V_2.get_Current();
                        if (this.used.ContainsKey(V_3))
                        {
                            continue;
                        }
                        V_0 = V_3;
                        goto Label0;
                    }
                }
                finally
                {
                    if (V_2 != null)
                    {
                        V_2.Dispose();
                    }
                }
Label0:
                if (V_0 == null)
                {
                    continue;
                }
                this.RecursiveDfs(V_0);
            }while (V_0 != null);
            V_1 = new ICollection <ClassHierarchyNode> [this.componentCount];
            V_4 = this.nodeToComponent.get_Keys().GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_5 = V_4.get_Current();
                    V_6 = this.nodeToComponent.get_Item(V_5);
                    if (V_1[V_6] == null)
                    {
                        V_1[V_6] = new List <ClassHierarchyNode>();
                    }
                    ((List <ClassHierarchyNode>)V_1[V_6]).Add(V_5);
                }
            }
            finally
            {
                ((IDisposable)V_4).Dispose();
            }
            return(V_1);
        }
		private void GenerateStackData()
		{
			V_0 = new StackUsageData();
			V_1 = this.instructionOffsetToUsedInstructionsMap.GetEnumerator();
			try
			{
				while (V_1.MoveNext())
				{
					V_2 = V_1.get_Current();
					V_3 = new List<VariableDefinition>(V_2.get_Value().Select<int, VariableDefinition>(new Func<int, VariableDefinition>(this.u003cGenerateStackDatau003eb__25_0)));
					V_0.get_InstructionOffsetToUsedStackVariablesMap().set_Item(V_2.get_Key(), V_3);
					V_4 = V_3.GetEnumerator();
					try
					{
						while (V_4.MoveNext())
						{
							V_5 = V_4.get_Current();
							this.GetDefineUseInfo(V_0, V_5).get_UsedAt().Add(V_2.get_Key());
						}
					}
					finally
					{
						((IDisposable)V_4).Dispose();
					}
				}
			}
			finally
			{
				((IDisposable)V_1).Dispose();
			}
			V_6 = this.instructionOffsetToVariableDefinitionMap.GetEnumerator();
			try
			{
				while (V_6.MoveNext())
				{
					V_7 = V_6.get_Current();
					if (V_7.get_Key() >= 0)
					{
						V_0.get_InstructionOffsetToAssignedVariableMap().Add(V_7.get_Key(), V_7.get_Value());
						dummyVar0 = this.GetDefineUseInfo(V_0, V_7.get_Value()).get_DefinedAt().Add(V_7.get_Key());
					}
					else
					{
						V_0.get_ExceptionHandlerStartToExceptionVariableMap().Add(-V_7.get_Key(), V_7.get_Value());
					}
				}
			}
			finally
			{
				((IDisposable)V_6).Dispose();
			}
			this.methodContext.set_StackData(V_0);
			return;
		}
 protected override string ToString(string constructName, HashSet <CFGBlockLogicalConstruct> printedCFGBlocks, LogicalFlowBuilderContext context)
 {
     V_0       = new StringBuilder(this.GetType().get_Name());
     dummyVar0 = V_0.AppendLine();
     dummyVar1 = V_0.AppendLine("{");
     this.IndentAndAppendString(V_0, (this.get_Entry() as LogicalConstructBase).ToString(context));
     dummyVar2 = V_0.AppendLine();
     if (this.get_DefaultCase() != null)
     {
         this.IndentAndAppendString(V_0, this.get_DefaultCase().ToString(context));
     }
     V_1 = this.get_ConditionCases();
     V_2 = 0;
     while (V_2 < (int)V_1.Length)
     {
         this.IndentAndAppendString(V_0, V_1[V_2].ToString(context));
         V_2 = V_2 + 1;
     }
     V_4 = this.get_NonDominatedCFGSuccessors().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5       = V_4.get_Current();
             dummyVar3 = V_0.Append("\tCase");
             V_6       = V_5.get_Key().GetEnumerator();
             try
             {
                 while (V_6.MoveNext())
                 {
                     V_7       = V_6.get_Current();
                     dummyVar4 = V_0.Append(" ").Append(V_7);
                 }
             }
             finally
             {
                 ((IDisposable)V_6).Dispose();
             }
             dummyVar5 = V_0.Append(": ").AppendLine(this.NodeILOffset(context, V_5.get_Value()));
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     if (this.get_DefaultCase() == null)
     {
         dummyVar6 = V_0.Append("\tDefault: ").AppendLine(this.NodeILOffset(context, this.get_DefaultCFGSuccessor()));
     }
     dummyVar7 = V_0.Append("\tFollowNode: ").AppendLine(this.NodeILOffset(context, this.get_CFGFollowNode()));
     dummyVar8 = V_0.AppendLine("}");
     printedCFGBlocks.UnionWith(this.get_CFGBlocks());
     return(V_0.ToString());
 }
Exemple #17
0
 private Statement FixSwitchingStatement(Statement statement)
 {
     if (statement as SwitchStatement == null)
     {
         if (statement as IfElseIfStatement != null)
         {
             V_4 = (statement as IfElseIfStatement).get_ConditionBlocks().GetEnumerator();
             try
             {
                 while (V_4.MoveNext())
                 {
                     V_5 = V_4.get_Current();
                     this.FixConditionExpression(V_5.get_Key() as BinaryExpression);
                 }
             }
             finally
             {
                 ((IDisposable)V_4).Dispose();
             }
         }
     }
     else
     {
         V_0 = statement as SwitchStatement;
         if (V_0.get_Condition().Equals(this.theIntVariable))
         {
             V_0.set_Condition(this.theStringVariable.CloneExpressionOnly());
         }
         V_1 = V_0.get_Cases().GetEnumerator();
         try
         {
             while (V_1.MoveNext())
             {
                 V_2 = V_1.get_Current();
                 if (V_2 as ConditionCase == null)
                 {
                     continue;
                 }
                 stackVariable34 = V_2 as ConditionCase;
                 V_3             = (Int32)(stackVariable34.get_Condition() as LiteralExpression).get_Value();
                 stackVariable34.set_Condition(new LiteralExpression(this.valueDictionary.get_Item(V_3), this.theTypeSystem, null));
             }
         }
         finally
         {
             if (V_1 != null)
             {
                 V_1.Dispose();
             }
         }
     }
     return(statement);
 }
 private Dictionary <string, List <string> > GetModuleCollisionTypesData(ModuleDefinition module, ILanguage language)
 {
     V_0 = new Dictionary <string, List <string> >(language.get_IdentifierComparer());
     V_1 = new Dictionary <string, string>(language.get_IdentifierComparer());
     this.UpdateCollisionTypesDataWithTypes(V_0, V_1, module.get_Types());
     V_2 = this.GetModuleDependsOnAnalysis(module);
     if (Mono.Cecil.AssemblyResolver.Extensions.IsReferenceAssembly(module))
     {
         stackVariable16 = 1;
     }
     else
     {
         stackVariable16 = 0;
     }
     V_3 = stackVariable16;
     V_4 = V_2.get_Keys().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             V_6 = module.get_AssemblyResolver().Resolve(V_5, "", ModuleDefinitionExtensions.GetModuleArchitecture(module), V_3, true);
             if (V_6 == null)
             {
                 this.UpdateCollisionTypesDataWithTypes(V_0, V_1, V_2.get_Item(V_5));
             }
             else
             {
                 V_7 = V_6.get_Modules().GetEnumerator();
                 try
                 {
                     while (V_7.MoveNext())
                     {
                         V_8 = V_7.get_Current();
                         this.UpdateCollisionTypesDataWithTypes(V_0, V_1, V_8.get_Types());
                     }
                 }
                 finally
                 {
                     V_7.Dispose();
                 }
             }
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return(V_0);
 }
Exemple #19
0
 private void FindReachableBlocks()
 {
     this.GetGuardedBlockToExceptionHandlersMap();
     stackVariable3    = new InstructionBlock[1];
     stackVariable3[0] = this.theCFG.get_Blocks()[0];
     this.GetReachableBlocks(stackVariable3);
     while (true)
     {
         V_0 = new List <InstructionBlock>();
         V_1 = new List <InstructionBlock>();
         V_2 = this.guardedBlockToExceptionHandler.GetEnumerator();
         try
         {
             while (V_2.MoveNext())
             {
                 V_3 = V_2.get_Current();
                 if (!this.reachableBlocks.Contains(V_3.get_Key()))
                 {
                     continue;
                 }
                 V_0.Add(V_3.get_Key());
                 V_1.AddRange(V_3.get_Value());
             }
         }
         finally
         {
             ((IDisposable)V_2).Dispose();
         }
         if (V_0.get_Count() == 0)
         {
             break;
         }
         V_4 = V_0.GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5       = V_4.get_Current();
                 dummyVar0 = this.guardedBlockToExceptionHandler.Remove(V_5);
             }
         }
         finally
         {
             ((IDisposable)V_4).Dispose();
         }
         this.GetReachableBlocks(V_1);
     }
     return;
 }
        private void ProcessLogicalConstruct(ILogicalConstruct construct)
        {
            V_0 = this.GetDominatorTreeFromContext(construct);
            V_1 = 0x7fffffff;
            this.RemoveBackEdgesFromSwitchConstructs(construct);
            while (V_1 > 1)
            {
                V_2             = (new IntervalAnalyzer(construct, this.removedEdges)).ReduceCfg();
                stackVariable14 = new List <IntervalConstruct>(V_2);
                stackVariable14.Reverse();
                V_3 = false;
                V_4 = stackVariable14.GetEnumerator();
                try
                {
                    while (V_4.MoveNext())
                    {
                        V_5 = V_4.get_Current();
                        if (!this.TryMakeLoop(V_5, V_0))
                        {
                            continue;
                        }
                        V_3 = true;
                        goto Label0;
                    }
                }
                finally
                {
                    ((IDisposable)V_4).Dispose();
                }
Label0:
                if (!V_3)
                {
                    if (V_2.get_Count() == V_1)
                    {
                        this.RemoveBlockingEdges(V_2);
                    }
                    if (V_2.get_Count() > V_1)
                    {
                        throw new Exception("Intervails are more than in the last iteration.");
                    }
                    V_1 = V_2.get_Count();
                }
                else
                {
                    V_1 = V_2.get_Count();
                }
            }
            return;
        }
 private List <KeyValuePair <int, int> > MaximumWeightBipartiteGraphMatching()
 {
     this.Initialization();
     while (true)
     {
         this.GenerateExcessMatrixAndEqualitySubgraph();
         V_0 = this.FindMaximumCardianlityMatching();
         if (V_0.get_Count() == this.size)
         {
             break;
         }
         V_1 = this.MinimumVertexCover(V_0);
         V_2 = this.GetMinElement(V_1);
         V_6 = 0;
         while (V_6 < this.size)
         {
             if (!V_1[V_6])
             {
                 stackVariable40 = &this.u[V_6];
                 stackVariable40 = stackVariable40 - V_2;
             }
             if (V_1[V_6 + this.size])
             {
                 stackVariable33 = &this.v[V_6];
                 stackVariable33 = stackVariable33 + V_2;
             }
             V_6 = V_6 + 1;
         }
     }
     V_3 = new List <KeyValuePair <int, int> >();
     V_4 = V_0.GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (this.graph[V_5.get_Key(), V_5.get_Value() - this.size] == 0)
             {
                 continue;
             }
             V_3.Add(new KeyValuePair <int, int>(V_5.get_Key(), V_5.get_Value() - this.size));
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return(V_3);
 }
		public static List<TypeDefinition> GetBaseTypes(this TypeDefinition targetType)
		{
			V_0 = new List<TypeDefinition>();
			if (targetType == null)
			{
				return V_0;
			}
			V_0.Add(targetType);
			V_1 = 0;
			while (V_1 < V_0.get_Count())
			{
				stackVariable10 = V_0.get_Item(V_1);
				V_2 = stackVariable10.get_BaseType();
				if (V_2 != null)
				{
					V_3 = V_2.Resolve();
					if (V_3 != null)
					{
						V_0.Add(V_3);
					}
				}
				V_4 = stackVariable10.get_Interfaces().GetEnumerator();
				try
				{
					while (V_4.MoveNext())
					{
						V_5 = V_4.get_Current();
						if (V_5 == null)
						{
							continue;
						}
						V_6 = V_5.Resolve();
						if (V_6 == null)
						{
							continue;
						}
						V_0.Add(V_6);
					}
				}
				finally
				{
					V_4.Dispose();
				}
				V_1 = V_1 + 1;
			}
			return V_0;
		}
 private void CollectVariableNames()
 {
     V_0 = new HashSet <string>(this.methodContext.get_VariableNamesCollection(), this.context.get_Language().get_IdentifierComparer());
     V_1 = this.methodContext.get_Body().get_Variables().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             if (!this.methodContext.get_VariableDefinitionToNameMap().TryGetValue(V_2, out V_3))
             {
                 V_3 = V_2.get_Name();
             }
             if (V_0.Contains(V_3))
             {
                 continue;
             }
             dummyVar0 = V_0.Add(V_3);
         }
     }
     finally
     {
         V_1.Dispose();
     }
     V_4 = this.methodContext.get_VariableDefinitionToNameMap().get_Values().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (V_0.Contains(V_5))
             {
                 continue;
             }
             dummyVar1 = V_0.Add(V_5);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     this.methodContext.set_VariableNamesCollection(V_0);
     return;
 }
 private void RemoveExcessNodesFromTheTryBlock()
 {
     V_0 = new HashSet <ILogicalConstruct>(this.finallyBlocks);
     V_1 = new Queue <ILogicalConstruct>(this.finallyBlocks);
     while (V_1.get_Count() > 0)
     {
         V_2 = V_1.Dequeue().get_SameParentSuccessors().GetEnumerator();
         try
         {
             while (V_2.MoveNext())
             {
                 V_3 = (ILogicalConstruct)V_2.get_Current();
                 if (V_0.Contains(V_3) || V_3 == this.entryOfTry)
                 {
                     continue;
                 }
                 dummyVar0 = V_0.Add(V_3);
                 V_1.Enqueue(V_3);
             }
         }
         finally
         {
             ((IDisposable)V_2).Dispose();
         }
     }
     V_4 = V_0.GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5 = V_4.get_Current();
             if (V_5 == this.entryOfTry)
             {
                 continue;
             }
             dummyVar1 = this.newTryBody.Remove(V_5);
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return;
 }
Exemple #25
0
 public XElement ParseXElement()
 {
     dummyVar0       = XNamespace.op_Implicit("http://www.w3.org/1999/xhtml");
     V_0             = XNamespace.op_Implicit("http://www.sitemaps.org/schemas/sitemap/0.9");
     V_1             = XNamespace.op_Implicit("http://www.w3.org/1999/xhtml");
     V_2             = new XElement(XNamespace.op_Addition(V_0, "url"));
     stackVariable10 = V_2;
     stackVariable13 = XNamespace.op_Addition(V_0, "lastmod");
     if (this.get_LastMod().get_HasValue())
     {
         stackVariable21 = this.get_LastMod().get_Value();
     }
     else
     {
         stackVariable21 = DateTime.get_UtcNow();
     }
     stackVariable10.Add(new XElement(stackVariable13, (object)stackVariable21));
     V_2.Add(new XElement(XNamespace.op_Addition(V_0, "changefreq"), this.get_ChangeFreq()));
     V_2.Add(new XElement(XNamespace.op_Addition(V_0, "priority"), (object)this.get_Priority()));
     V_2.Add(new XElement(XNamespace.op_Addition(V_0, "loc"), this.get_Loc()));
     V_4 = this.get_OtherLanguages().GetEnumerator();
     try
     {
         while (V_4.MoveNext())
         {
             V_5                = V_4.get_Current();
             stackVariable56    = XNamespace.op_Addition(V_1, "link");
             stackVariable58    = new object[4];
             stackVariable58[0] = new XAttribute(XNamespace.op_Addition(XNamespace.get_Xmlns(), "xhtml"), V_1.get_NamespaceName());
             stackVariable58[1] = new XAttribute(XName.op_Implicit("rel"), "alternate");
             stackVariable58[2] = new XAttribute(XName.op_Implicit("hreflang"), V_5.get_HrefLang());
             stackVariable58[3] = new XAttribute(XName.op_Implicit("href"), V_5.get_Href());
             V_2.Add(new XElement(stackVariable56, stackVariable58));
         }
     }
     finally
     {
         ((IDisposable)V_4).Dispose();
     }
     return(V_2);
 }
 private bool[,] GeenrateAdjacencyMatrix(Dictionary <ClassHierarchyNode, int> nodeToIndex)
 {
     stackVariable2 = this.inferenceGraph.get_Count();
     V_0            = new bool[stackVariable2, stackVariable2];
     V_1            = this.inferenceGraph.GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_3 = nodeToIndex.get_Item(V_2);
             V_4 = V_2.get_CanAssignTo().GetEnumerator();
             try
             {
                 while (V_4.MoveNext())
                 {
                     V_5 = V_4.get_Current();
                     V_0[V_3, nodeToIndex.get_Item(V_5)] = true;
                 }
             }
             finally
             {
                 if (V_4 != null)
                 {
                     V_4.Dispose();
                 }
             }
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     return(V_0);
 }
 protected override bool TryMatchInternal(StatementCollection statements, int startIndex, out Statement result, out int replacedStatementsCount)
 {
     result = null;
     replacedStatementsCount = 0;
     if (!this.TryGetObjectCreation(statements, startIndex, out V_0, out V_1))
     {
         return(false);
     }
     V_2 = new ExpressionCollection();
     V_3 = new HashSet <string>();
     if (V_0.get_Initializer() != null)
     {
         if (V_0.get_Initializer().get_InitializerType() != 1)
         {
             return(false);
         }
         V_4 = V_0.get_Initializer().get_Expressions().GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_5       = V_4.get_Current();
                 V_6       = this.GetName((V_5 as BinaryExpression).get_Left());
                 dummyVar0 = V_3.Add(V_6);
             }
         }
         finally
         {
             if (V_4 != null)
             {
                 V_4.Dispose();
             }
         }
     }
     V_7 = startIndex + 1;
     while (V_7 < statements.get_Count() && this.TryGetNextExpression(statements.get_Item(V_7), out V_8))
     {
         V_9 = V_8 as BinaryExpression;
         if (!this.IsObjectPropertyOrFieldAssignment(V_9, V_1))
         {
             break;
         }
         V_10 = null;
         if (V_9.get_Left().get_CodeNodeType() != 42)
         {
             if (V_9.get_Left().get_CodeNodeType() == 30)
             {
                 V_13 = (V_9.get_Left() as FieldReferenceExpression).get_Field().Resolve();
                 if (!this.Visit(V_13.get_Name(), V_3))
                 {
                     break;
                 }
                 V_10 = new FieldInitializerExpression(V_13, V_13.get_FieldType(), V_9.get_Left().get_UnderlyingSameMethodInstructions());
             }
         }
         else
         {
             V_12 = (V_9.get_Left() as PropertyReferenceExpression).get_Property();
             if (!this.Visit(V_12.get_Name(), V_3))
             {
                 break;
             }
             V_10 = new PropertyInitializerExpression(V_12, V_12.get_PropertyType(), V_9.get_Left().get_UnderlyingSameMethodInstructions());
         }
         V_11 = new BinaryExpression(26, V_10, V_9.get_Right().Clone(), this.typeSystem, null, false);
         V_2.Add(V_11);
         V_7 = V_7 + 1;
     }
     if (V_2.get_Count() == 0)
     {
         return(false);
     }
     if (V_0.get_Initializer() != null)
     {
         V_4 = V_2.GetEnumerator();
         try
         {
             while (V_4.MoveNext())
             {
                 V_15 = V_4.get_Current();
                 V_0.get_Initializer().get_Expressions().Add(V_15);
             }
         }
         finally
         {
             if (V_4 != null)
             {
                 V_4.Dispose();
             }
         }
     }
     else
     {
         V_14 = new InitializerExpression(V_2, 1);
         V_14.set_IsMultiLine(true);
         V_0.set_Initializer(V_14);
     }
     result = statements.get_Item(startIndex);
     replacedStatementsCount = V_2.get_Count() + 1;
     return(true);
 }
		internal static bool IsAnonymous(this TypeDefinition self)
		{
			if (self == null || String.op_Inequality(self.get_Namespace(), String.Empty) || !self.get_IsSealed() || !self.get_IsNotPublic() || String.op_Inequality(self.get_BaseType().get_FullName(), "System.Object") || !self.get_HasGenericParameters() || !self.HasCompilerGeneratedAttribute())
			{
				return false;
			}
			V_0 = 0;
			if (self.get_Interfaces().get_Count() > 1)
			{
				return false;
			}
			if (self.get_Interfaces().get_Count() == 1)
			{
				if (!String.op_Equality(self.get_Interfaces().get_Item(0).get_Name(), "IEquatable`1"))
				{
					return false;
				}
				V_0 = 1;
			}
			V_1 = self.get_Properties().get_Count();
			if (V_1 != self.get_GenericParameters().get_Count() || V_1 != self.get_Fields().get_Count())
			{
				return false;
			}
			V_2 = 0;
			V_4 = self.get_Properties().GetEnumerator();
			try
			{
				while (V_4.MoveNext())
				{
					V_5 = V_4.get_Current();
					if (V_5.get_GetMethod() != null)
					{
						stackVariable50 = V_2;
						if (V_5.get_SetMethod() != null)
						{
							stackVariable53 = 2;
						}
						else
						{
							stackVariable53 = 1;
						}
						V_2 = stackVariable50 + stackVariable53;
					}
					else
					{
						V_6 = false;
						goto Label1;
					}
				}
				goto Label0;
			}
			finally
			{
				V_4.Dispose();
			}
		Label1:
			return V_6;
		Label0:
			V_3 = self.get_Methods().get_Count();
			if (V_2 + V_0 >= V_3)
			{
				return false;
			}
			return V_3 <= V_2 + V_0 + 4;
		}
Exemple #29
0
        private DecompiledType GetDecompiledType(IMemberDefinition member, ILanguage language)
        {
            V_0 = Utilities.GetDeclaringTypeOrSelf(member);
            V_1 = new DecompiledType(V_0);
            V_2 = new Queue <IMemberDefinition>();
            V_2.Enqueue(member);
Label0:
            while (V_2.get_Count() > 0)
            {
                V_3 = V_2.Dequeue();
                if (V_3 as TypeDefinition != null && (object)V_3 == (object)member)
                {
                    V_4 = Utilities.GetTypeMembers(V_3 as TypeDefinition, language, true, null, null, null, V_1.get_TypeContext().GetFieldToPropertyMap(language).get_Keys()).GetEnumerator();
                    try
                    {
                        while (V_4.MoveNext())
                        {
                            V_5 = V_4.get_Current();
                            V_2.Enqueue(V_5);
                        }
                    }
                    finally
                    {
                        ((IDisposable)V_4).Dispose();
                    }
                }
                if (V_3 as MethodDefinition != null)
                {
                    this.DecompileMember(V_3 as MethodDefinition, language, V_1);
                }
                if (V_3 as EventDefinition != null)
                {
                    V_6 = V_3 as EventDefinition;
                    if ((new AutoImplementedEventMatcher(V_6, language)).IsAutoImplemented())
                    {
                        dummyVar0 = V_1.get_TypeContext().get_AutoImplementedEvents().Add(V_6);
                    }
                    if (V_6.get_AddMethod() != null)
                    {
                        this.DecompileMember(V_6.get_AddMethod(), language, V_1);
                    }
                    if (V_6.get_RemoveMethod() != null)
                    {
                        this.DecompileMember(V_6.get_RemoveMethod(), language, V_1);
                    }
                    if (V_6.get_InvokeMethod() != null)
                    {
                        this.DecompileMember(V_6.get_InvokeMethod(), language, V_1);
                    }
                }
                if (V_3 as PropertyDefinition != null)
                {
                    V_7             = V_3 as PropertyDefinition;
                    stackVariable52 = new PropertyDecompiler(V_7, language, this.renameInvalidMembers, this.cacheService, V_1.get_TypeContext());
                    stackVariable52.add_ExceptionThrown(new EventHandler <Exception>(this.OnExceptionThrown));
                    stackVariable52.Decompile(out V_8, out V_9, out V_10);
                    stackVariable52.remove_ExceptionThrown(new EventHandler <Exception>(this.OnExceptionThrown));
                    if (V_10)
                    {
                        dummyVar1 = V_1.get_TypeContext().get_AutoImplementedProperties().Add(V_7);
                    }
                    if (V_8 != null)
                    {
                        this.AddDecompiledMemberToDecompiledType(V_8, V_1);
                    }
                    if (V_9 != null)
                    {
                        this.AddDecompiledMemberToDecompiledType(V_9, V_1);
                    }
                    V_11 = stackVariable52.get_ExceptionsWhileDecompiling().GetEnumerator();
                    try
                    {
                        while (V_11.MoveNext())
                        {
                            V_12 = V_11.get_Current();
                            this.get_ExceptionsWhileDecompiling().Add(V_12);
                        }
                    }
                    finally
                    {
                        if (V_11 != null)
                        {
                            V_11.Dispose();
                        }
                    }
                }
                if (V_3 as FieldDefinition == null)
                {
                    continue;
                }
                V_13 = V_3 as FieldDefinition;
                V_14 = V_3.get_DeclaringType().get_Methods().GetEnumerator();
                try
                {
                    while (V_14.MoveNext())
                    {
                        V_15 = V_14.get_Current();
                        if (!V_15.get_IsConstructor() || V_13.get_IsStatic() != V_15.get_IsStatic())
                        {
                            continue;
                        }
                        this.DecompileConstructorChain(V_15, language, V_1);
                        goto Label0;
                    }
                }
                finally
                {
                    V_14.Dispose();
                }
            }
            V_1.get_TypeContext().set_ExplicitlyImplementedMembers(this.GetExplicitlyImplementedInterfaceMethods(V_0, language));
            this.AddGeneratedFilterMethodsToDecompiledType(V_1, V_1.get_TypeContext(), language);
            return(V_1);
        }
        private LoopType DetermineLoopType(HashSet <ILogicalConstruct> loopBody, HashSet <ILogicalConstruct> latchingNodes, IntervalConstruct interval, DominatorTree dominatorTree, out ConditionLogicalConstruct loopCondition)
        {
            V_0       = interval.get_Entry() as ILogicalConstruct;
            V_1       = new HashSet <ILogicalConstruct>(latchingNodes);
            dummyVar0 = V_1.Add(V_0);
            V_2       = DFSTBuilder.BuildTree(V_0.get_Parent() as ILogicalConstruct);
            V_3       = new HashSet <ILogicalConstruct>();
            V_4       = loopBody.GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_5 = V_4.get_Current();
                    V_6 = dominatorTree.GetDominanceFrontier(V_5).GetEnumerator();
                    try
                    {
                        while (V_6.MoveNext())
                        {
                            V_7 = (ILogicalConstruct)V_6.get_Current();
                            if (!interval.get_Children().Contains(V_7) || loopBody.Contains(V_7))
                            {
                                continue;
                            }
                            dummyVar1 = V_3.Add(V_7);
                        }
                    }
                    finally
                    {
                        ((IDisposable)V_6).Dispose();
                    }
                }
            }
            finally
            {
                ((IDisposable)V_4).Dispose();
            }
            if (V_3.get_Count() == 0)
            {
                V_8 = V_2.get_ReversePostOrder().GetEnumerator();
                try
                {
                    while (V_8.MoveNext())
                    {
                        V_9 = V_8.get_Current().get_Construct() as ILogicalConstruct;
                        if (loopBody.Contains(V_9))
                        {
                            continue;
                        }
                        loopCondition = this.GetLoopConditionWithMaxIndex(V_2, loopBody, V_1, V_9);
                        if (loopCondition == null)
                        {
                            continue;
                        }
                        this.ExpandLoopBody(interval, loopBody, V_9);
                        if (loopCondition != V_0)
                        {
                            V_10 = 2;
                            goto Label1;
                        }
                        else
                        {
                            V_10 = 1;
                            goto Label1;
                        }
                    }
                    goto Label0;
                }
                finally
                {
                    ((IDisposable)V_8).Dispose();
                }
Label1:
                return(V_10);
            }
            V_11 = V_2.get_ReversePostOrder().get_Count();
            V_4  = V_3.GetEnumerator();
            try
            {
                while (V_4.MoveNext())
                {
                    V_13 = V_4.get_Current();
                    V_14 = V_2.get_ConstructToNodeMap().get_Item(V_13).get_ReversePostOrderIndex();
                    if (V_14 >= V_11)
                    {
                        continue;
                    }
                    V_11 = V_14;
                }
            }
            finally
            {
                ((IDisposable)V_4).Dispose();
            }
            V_12          = V_2.get_ReversePostOrder().get_Item(V_11).get_Construct() as ILogicalConstruct;
            loopCondition = this.GetLoopConditionWithMaxIndex(V_2, loopBody, V_1, V_12);
            this.ExpandLoopBody(interval, loopBody, V_12);
            if (loopCondition == null)
            {
                return(0);
            }
            if (loopCondition == V_0)
            {
                return(1);
            }
            return(2);

Label0:
            if (!this.CanBeLoopCondition(V_0, loopBody))
            {
                loopCondition = null;
                return(0);
            }
            loopCondition = V_0 as ConditionLogicalConstruct;
            return(1);
        }