本文整理汇总了C#中ProtoCore.SetNewEntryPoint方法的典型用法代码示例。如果您正苦于以下问题:C# ProtoCore.SetNewEntryPoint方法的具体用法?C# ProtoCore.SetNewEntryPoint怎么用?C# ProtoCore.SetNewEntryPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProtoCore
的用法示例。
在下文中一共展示了ProtoCore.SetNewEntryPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MarkGraphNodesDirty
/// <summary>
/// Finds all graphnodes associated with each AST and marks them dirty
/// </summary>
/// <param name="nodeList"></param>
/// <summary>
/// <returns></returns>
public static void MarkGraphNodesDirty(ProtoCore.Core core, IEnumerable<ProtoCore.AST.AssociativeAST.AssociativeNode> nodeList)
{
if (nodeList == null)
return;
bool setEntryPoint = false;
foreach (var node in nodeList)
{
var bNode = node as ProtoCore.AST.AssociativeAST.BinaryExpressionNode;
if (bNode == null)
{
continue;
}
foreach (var gnode in core.DSExecutable.instrStreamList[0].dependencyGraph.GraphList)
{
if (gnode.isActive && gnode.OriginalAstID == bNode.OriginalAstID)
{
if (!setEntryPoint)
{
setEntryPoint = true;
core.SetNewEntryPoint(gnode.updateBlock.startpc);
}
gnode.isDirty = true;
gnode.isActive = true;
}
}
}
}
示例2: MarkGraphNodesDirtyFromFunctionRedef
public static void MarkGraphNodesDirtyFromFunctionRedef(ProtoCore.Core core, List<ProtoCore.AST.AssociativeAST.AssociativeNode> fnodeList)
{
foreach (ProtoCore.AST.AssociativeAST.AssociativeNode node in fnodeList)
{
ProtoCore.AST.AssociativeAST.FunctionDefinitionNode fnode = node as ProtoCore.AST.AssociativeAST.FunctionDefinitionNode;
if (null == fnode)
{
continue;
}
int exprId = ProtoCore.DSASM.Constants.kInvalidIndex;
foreach (var gnode in core.DSExecutable.instrStreamList[0].dependencyGraph.GraphList)
{
if (gnode.isActive)
{
if (null != gnode.firstProc)
{
if (fnode.Name == gnode.firstProc.name && fnode.Signature.Arguments.Count == gnode.firstProc.argInfoList.Count)
{
if (ProtoCore.DSASM.Constants.kInvalidIndex == exprId)
{
exprId = gnode.exprUID;
core.SetNewEntryPoint(gnode.updateBlock.startpc);
}
gnode.isDirty = true;
}
}
else if (ProtoCore.DSASM.Constants.kInvalidIndex != exprId)
{
if (gnode.exprUID == exprId)
{
gnode.isDirty = true;
if (gnode.IsLastNodeInSSA)
{
exprId = ProtoCore.DSASM.Constants.kInvalidIndex;
}
}
}
}
}
}
}