Exemplo n.º 1
0
        /// <summary>
        /// Perform some debugging tasks for checking public state of optimizer
        /// </summary>
        private void CheckIntegrity()
        {
            var flag =
                _optimizedBlock
                .CommandsNoDeclare
                .OfType <CommandAssign>()
                .SelectMany(assign => _valueAccessProcessor.GetLValues(assign.RhsExpression))
                .Any(
                    lvalue =>
                    lvalue is SymbolLocalVariable &&
                    _optimizedBlock.ContainsLocalVariable(lvalue.ObjectName) == false
                    );

            if (flag)
            {
                throw new InvalidOperationException();
            }
        }