コード例 #1
0
        /// <summary>
        /// Fill final optimized command block with optimized code
        /// </summary>
        private void FillOptimizedCommandBlock()
        {
            //Remove all statements from optimized block
            _optimizedBlock.ClearCommands();

            //Add optimized statements from stetements table to optimized block
            foreach (var commandInfo in _commandsInfoList)
            {
                if (commandInfo.AssociatedCommand.LhsValueAccess.IsLocalVariable)
                {
                    _optimizedBlock.AddCommand_Declare(commandInfo.AssociatedCommand.LhsValueAccess.RootSymbolAsDataStore);
                }

                _optimizedBlock.AddCommand_Assign(
                    commandInfo.AssociatedCommand.LhsValueAccess,
                    commandInfo.AssociatedCommand.RhsExpression
                    );
            }
        }