本文整理汇总了C#中Tracker.Analyze方法的典型用法代码示例。如果您正苦于以下问题:C# Tracker.Analyze方法的具体用法?C# Tracker.Analyze怎么用?C# Tracker.Analyze使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker.Analyze方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisitBegin
public void VisitBegin(BeginMethod begin)
{
m_needsCheck = OnNeedsCheck(begin);
m_offset = -1;
if (m_needsCheck)
{
Log.DebugLine(this, "-----------------------------------");
Log.DebugLine(this, "{0:F}", begin.Info.Instructions);
m_foundTypeCheck = false;
m_info = begin.Info;
m_tracker = new Tracker(m_info.Instructions);
m_tracker.InitArg(1, -33); // give arg1 a magic value so we can track it
m_tracker.Analyze(m_info.Graph);
}
}
示例2: VisitBegin
public void VisitBegin(BeginMethod begin)
{
m_needsCheck = false;
m_offset = -1;
m_details = string.Empty;
if (!begin.Info.Method.DeclaringType.IsValueType) // structs can't be null so they're ok
{
if (DoIsEquals(begin.Info.Method))
{
m_tracker = new Tracker(begin.Info.Instructions);
m_tracker.InitArg(1, 0); // 0 is the this ptr
m_tracker.Analyze(begin.Info.Graph);
m_needsCheck = true;
}
else if (DoIsOperatorEquals(begin.Info.Method))
{
m_tracker = new Tracker(begin.Info.Instructions);
m_tracker.InitArg(0, 0); // static method so no this pointer
m_tracker.InitArg(1, 0);
m_tracker.Analyze(begin.Info.Graph);
m_needsCheck = true;
}
}
if (m_needsCheck)
{
Log.DebugLine(this, "-----------------------------------");
Log.DebugLine(this, "{0:F}", begin.Info.Instructions);
m_foundEarlyReturn = false;
m_info = begin.Info;
}
}
示例3: DoInit
private void DoInit(string methodName)
{
string loc = Assembly.GetExecutingAssembly().Location;
AssemblyDefinition assembly = AssemblyFactory.GetAssembly(loc);
string fullName = string.Format("{0}/{1}", GetType().FullName, "Cases");
TypeDefinition type = assembly.MainModule.Types[fullName];
MethodDefinition method = type.Methods.GetMethod(methodName)[0];
m_instructions = new TypedInstructionCollection(new SymbolTable(), method);
m_tracker = new Tracker(m_instructions);
m_tracker.Analyze();
}