本文整理汇总了C#中Core.SetNewEntryPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Core.SetNewEntryPoint方法的具体用法?C# Core.SetNewEntryPoint怎么用?C# Core.SetNewEntryPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.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(Core core, IEnumerable<AST.AssociativeAST.AssociativeNode> nodeList)
{
if (nodeList == null)
return;
bool setEntryPoint = false;
foreach (var node in nodeList)
{
var bNode = node as 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(Core core, List<AST.AssociativeAST.AssociativeNode> fnodeList)
{
bool entrypointSet = false;
foreach (var node in fnodeList)
{
var fnode = node as AST.AssociativeAST.FunctionDefinitionNode;
if (null == fnode)
{
continue;
}
int exprId = 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 (Constants.kInvalidIndex == exprId)
{
exprId = gnode.exprUID;
if (!entrypointSet)
{
core.SetNewEntryPoint(gnode.updateBlock.startpc);
entrypointSet = true;
}
}
gnode.isDirty = true;
}
}
else if (Constants.kInvalidIndex != exprId)
{
if (gnode.exprUID == exprId)
{
gnode.isDirty = true;
if (gnode.IsLastNodeInSSA)
{
exprId = Constants.kInvalidIndex;
}
}
}
}
}
}
}