Ejemplo n.º 1
0
 private bool TryAddToYieldReturningBlocks(InstructionBlock theBlock)
 {
     if (this.TryGetNextStateNumber(theBlock, out V_0) != 1)
     {
         return(false);
     }
     dummyVar0          = this.yieldReturns.Add(theBlock);
     V_1                = this.GetStateFistBlock(V_0);
     stackVariable15    = new InstructionBlock[1];
     stackVariable15[0] = V_1;
     theBlock.set_Successors(stackVariable15);
     return(true);
 }
Ejemplo n.º 2
0
        private bool TryProcessEndBlock(InstructionBlock theBlock)
        {
            V_0 = null;
            V_1 = theBlock.get_Last().get_Previous();
            if (!StateMachineUtilities.TryGetOperandOfLdc(V_1, out V_2))
            {
                if (!this.TryGetVariableFromInstruction(V_1, out V_0) || !this.CheckAndSaveReturnFlagVariable(V_0))
                {
                    return(false);
                }
                dummyVar2 = this.yieldBreaks.Add(theBlock);
                return(this.MarkTrueReturningPredecessorsAsYieldReturn(theBlock));
            }
            if (V_2 != 0)
            {
                if (V_2 != 1)
                {
                    return(false);
                }
                switch (this.TryGetNextStateNumber(theBlock, out V_3))
                {
                case 0:
                {
                    return(false);
                }

                case 1:
                {
                    dummyVar1          = this.yieldReturns.Add(theBlock);
                    V_4                = this.GetStateFistBlock(V_3);
                    stackVariable41    = new InstructionBlock[1];
                    stackVariable41[0] = V_4;
                    theBlock.set_Successors(stackVariable41);
                    break;
                }

                case 2:
                {
                    return(this.MarkPredecessorsAsYieldReturns(theBlock));
                }
                }
            }
            else
            {
                dummyVar0 = this.yieldBreaks.Add(theBlock);
            }
            return(true);
        }
 private bool TryRemoveStateSavingBlock(InstructionBlock theBlock)
 {
     V_0 = this.GetFirst <InstructionBlock>(theBlock.get_Predecessors());
     if ((int)V_0.get_Successors().Length != 2 || !this.CheckForIsCompletedCall(V_0))
     {
         return(false);
     }
     if (InstructionBlock.op_Equality(V_0.get_Successors()[0], theBlock))
     {
         stackVariable22 = V_0.get_Successors()[1];
     }
     else
     {
         stackVariable22 = V_0.get_Successors()[0];
     }
     V_1 = stackVariable22;
     theBlock.set_Successors(new InstructionBlock[0]);
     stackVariable28    = new InstructionBlock[1];
     stackVariable28[0] = V_1;
     V_0.set_Successors(stackVariable28);
     dummyVar0 = this.toBeRemoved.Add(theBlock);
     return(true);
 }