本文整理汇总了C#中Tracker.InitArg方法的典型用法代码示例。如果您正苦于以下问题:C# Tracker.InitArg方法的具体用法?C# Tracker.InitArg怎么用?C# Tracker.InitArg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker.InitArg方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
}
示例2: 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);
}
}