本文整理汇总了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);
}
}
}
示例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;
}