当前位置: 首页>>代码示例>>C#>>正文


C# AssociativeGraph.IsSSANode方法代码示例

本文整理汇总了C#中AssociativeGraph.IsSSANode方法的典型用法代码示例。如果您正苦于以下问题:C# AssociativeGraph.IsSSANode方法的具体用法?C# AssociativeGraph.IsSSANode怎么用?C# AssociativeGraph.IsSSANode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AssociativeGraph的用法示例。


在下文中一共展示了AssociativeGraph.IsSSANode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetFinalGraphNodeRuntimeDependents

 /// <summary>
 /// This function sets the modified temp graphnodes to the last graphnode in a statement
 /// </summary>
 /// <param name="graphnode"></param>
 public static void SetFinalGraphNodeRuntimeDependents(AssociativeGraph.GraphNode graphnode)
 {
     if (null != graphnode && graphnode.IsSSANode())
     {
         if (null != graphnode.lastGraphNode)
         {
             graphnode.lastGraphNode.symbolListWithinExpression.Add(graphnode.updateNodeRefList[0].nodeList[0].symbol);
         }
     }
 }
开发者ID:algobasket,项目名称:Dynamo,代码行数:14,代码来源:AssociativeGraph.cs

示例2: GetRedefinedGraphNodes

        /// <summary>
        /// GetRedefinedGraphNodes will return a list of graphnodes that have been redefined by executingGraphNode
        /// 
        /// Given:
        ///     [1] a = b + c
        ///     [2] a = d
        /// Statement [1] has been redefined by statment [2]    
        /// Return true if this has occured
        /// 
        /// </summary>
        /// <param name="executingGraphNode"></param>
        /// <param name="classScope"></param>
        /// <param name="functionScope"></param>
        public static List<AssociativeGraph.GraphNode> GetRedefinedGraphNodes(RuntimeCore runtimeCore, AssociativeGraph.GraphNode executingGraphNode, List<AssociativeGraph.GraphNode> nodesInScope, int classScope, int functionScope)
        {
            List<AssociativeGraph.GraphNode> redefinedNodes = new List<AssociativeGraph.GraphNode>();
            if (executingGraphNode != null)
            {
                // Remove this condition when full SSA is enabled
                bool isssa = (!executingGraphNode.IsSSANode() && executingGraphNode.DependsOnTempSSA());

                if (runtimeCore.Options.ExecuteSSA)
                {
                    isssa = executingGraphNode.IsSSANode();
                }
                if (!isssa)
                {
                    foreach (AssociativeGraph.GraphNode graphNode in nodesInScope)
                    {
                        bool allowRedefine = true;

                        SymbolNode symbol = executingGraphNode.updateNodeRefList[0].nodeList[0].symbol;
                        bool isMember = symbol.classScope != Constants.kInvalidIndex
                            && symbol.functionIndex == Constants.kInvalidIndex;

                        if (isMember)
                        {
                            // For member vars, do not allow if not in the same scope
                            if (symbol.classScope != graphNode.classIndex || symbol.functionIndex != graphNode.procIndex)
                            {
                                allowRedefine = false;
                            }
                        }

                        if (allowRedefine)
                        {
                            // Check if graphnode was redefined by executingGraphNode
                            if (AssociativeEngine.Utils.IsGraphNodeRedefined(graphNode, executingGraphNode))
                            {
                                redefinedNodes.Add(graphNode);
                            }
                        }
                    }
                }
            }
            return redefinedNodes;
        }
开发者ID:rafatahmed,项目名称:Dynamo,代码行数:57,代码来源:AssociativeGraph.cs


注:本文中的AssociativeGraph.IsSSANode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。