Example #1
0
        private void MergeWithSingleChild()
        {
            V_0 = false;
            do
            {
                V_1 = null;
                V_2 = this.inferenceGraph.GetEnumerator();
                try
                {
                    while (V_2.MoveNext())
                    {
                        V_3 = V_2.get_Current();
                        if (V_3.get_IsHardNode() || V_3.get_CanAssignTo().get_Count() != 1 || V_3.get_SubTypes().get_Count() != 0)
                        {
                            continue;
                        }
                        V_4 = null;
                        V_5 = V_3.get_CanAssignTo().GetEnumerator();
                        try
                        {
                            if (V_5.MoveNext())
                            {
                                V_4 = V_5.get_Current();
                            }
                        }
                        finally
                        {
                            if (V_5 != null)
                            {
                                V_5.Dispose();
                            }
                        }
                        stackVariable27    = new ClassHierarchyNode[2];
                        stackVariable27[0] = V_3;
                        stackVariable27[1] = V_4;
                        V_1 = (ICollection <ClassHierarchyNode>)stackVariable27;
                        V_0 = true;
                        goto Label0;
                    }
                }
                finally
                {
                    if (V_2 != null)
                    {
                        V_2.Dispose();
                    }
                }
Label0:
                if (!V_0)
                {
                    continue;
                }
                this.MergeNodes(V_1);
            }while (V_0);
            return;
        }
Example #2
0
        private void ReplaceMultipleChildConstraints()
        {
            V_0 = false;
            do
            {
                V_0 = false;
                V_1 = null;
                V_2 = this.inferenceGraph.GetEnumerator();
                try
                {
                    while (V_2.MoveNext())
                    {
                        V_3 = V_2.get_Current();
                        if (V_3.get_IsHardNode())
                        {
                            continue;
                        }
                        V_4 = true;
                        V_6 = V_3.get_CanAssignTo().GetEnumerator();
                        try
                        {
                            while (V_6.MoveNext())
                            {
                                if (V_6.get_Current().get_IsHardNode())
                                {
                                    continue;
                                }
                                V_4 = false;
                                goto Label1;
                            }
                        }
                        finally
                        {
                            if (V_6 != null)
                            {
                                V_6.Dispose();
                            }
                        }
Label1:
                        if (!V_4 || V_3.get_CanAssignTo().get_Count() == 0)
                        {
                            continue;
                        }
                        V_0                = true;
                        V_5                = this.FindGreatestCommonDescendant(V_3.get_CanAssignTo());
                        stackVariable32    = new ClassHierarchyNode[2];
                        stackVariable32[0] = V_3;
                        stackVariable32[1] = V_5;
                        V_1                = (ICollection <ClassHierarchyNode>)stackVariable32;
                        goto Label0;
                    }
                }
                finally
                {
                    if (V_2 != null)
                    {
                        V_2.Dispose();
                    }
                }
Label0:
                if (!V_0)
                {
                    continue;
                }
                this.MergeNodes(V_1);
            }while (V_0);
            return;
        }