本文整理匯總了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);
}
}
}