本文整理汇总了C#中AssociativeGraph.PushDependent方法的典型用法代码示例。如果您正苦于以下问题:C# AssociativeGraph.PushDependent方法的具体用法?C# AssociativeGraph.PushDependent怎么用?C# AssociativeGraph.PushDependent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssociativeGraph
的用法示例。
在下文中一共展示了AssociativeGraph.PushDependent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildSSADependency
private void BuildSSADependency(Node node, AssociativeGraph.GraphNode graphNode)
{
// Jun Comment: set the graphNode dependent as this identifier list
ProtoCore.Type type = new ProtoCore.Type();
type.UID = globalClassIndex;
ProtoCore.AssociativeGraph.UpdateNodeRef nodeRef = new AssociativeGraph.UpdateNodeRef();
DFSGetSymbolList(node, ref type, nodeRef);
if (null != graphNode && nodeRef.nodeList.Count > 0)
{
ProtoCore.AssociativeGraph.GraphNode dependentNode = new ProtoCore.AssociativeGraph.GraphNode();
dependentNode.updateNodeRefList.Add(nodeRef);
graphNode.PushDependent(dependentNode);
}
}
示例2: BuildRealDependencyForIdentList
protected void BuildRealDependencyForIdentList(AssociativeGraph.GraphNode graphNode)
{
if (ssaPointerStack.Count == 0)
{
return;
}
// Push all dependent pointers
ProtoCore.AST.AssociativeAST.IdentifierListNode identList = BuildIdentifierList(ssaPointerStack.Peek());
// Comment Jun: perhaps this can be an assert?
if (null != identList)
{
ProtoCore.Type type = new ProtoCore.Type();
type.UID = globalClassIndex;
ProtoCore.AssociativeGraph.UpdateNodeRef nodeRef = new AssociativeGraph.UpdateNodeRef();
int functionIndex = globalProcIndex;
DFSGetSymbolList_Simple(identList, ref type, ref functionIndex, nodeRef);
if (null != graphNode && nodeRef.nodeList.Count > 0)
{
ProtoCore.AssociativeGraph.GraphNode dependentNode = new ProtoCore.AssociativeGraph.GraphNode();
dependentNode.updateNodeRefList.Add(nodeRef);
graphNode.PushDependent(dependentNode);
// If the pointerList is a setter, then it should also be in the lhs of a graphNode
// Given:
// a.x = 1
// Which was converted to:
// tvar = a.set_x(1)
// Set a.x as lhs of the graphnode.
// This means that statement that depends on a.x can re-execute, such as:
// p = a.x;
//
List<ProtoCore.AST.AssociativeAST.AssociativeNode> topList = ssaPointerStack.Peek();
string propertyName = topList[topList.Count - 1].Name;
bool isSetter = propertyName.StartsWith(Constants.kSetterPrefix);
if (isSetter)
{
graphNode.updateNodeRefList.Add(nodeRef);
graphNode.IsLHSIdentList = true;
AutoGenerateUpdateArgumentReference(nodeRef, graphNode);
}
}
}
}
示例3: BuildRealDependencyForIdentList
protected void BuildRealDependencyForIdentList(AssociativeGraph.GraphNode graphNode)
{
// Push all dependent pointers
ProtoCore.AST.AssociativeAST.IdentifierListNode identList = BuildIdentifierList(ssaPointerList);
// Comment Jun: perhaps this can be an assert?
if (null != identList)
{
ProtoCore.Type type = new ProtoCore.Type();
type.UID = globalClassIndex;
ProtoCore.AssociativeGraph.UpdateNodeRef nodeRef = new AssociativeGraph.UpdateNodeRef();
int functionIndex = globalProcIndex;
DFSGetSymbolList_Simple(identList, ref type, ref functionIndex, nodeRef);
if (null != graphNode && nodeRef.nodeList.Count > 0)
{
ProtoCore.AssociativeGraph.GraphNode dependentNode = new ProtoCore.AssociativeGraph.GraphNode();
dependentNode.updateNodeRefList.Add(nodeRef);
graphNode.PushDependent(dependentNode);
}
}
}