本文整理汇总了C#中System.Reflection.Emit.OpCode.EndsUncondJmpBlk方法的典型用法代码示例。如果您正苦于以下问题:C# OpCode.EndsUncondJmpBlk方法的具体用法?C# OpCode.EndsUncondJmpBlk怎么用?C# OpCode.EndsUncondJmpBlk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Reflection.Emit.OpCode
的用法示例。
在下文中一共展示了OpCode.EndsUncondJmpBlk方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateStackSize
internal void UpdateStackSize(OpCode opcode, int stackchange)
{
// Updates internal variables for keeping track of the stack size
// requirements for the function. stackchange specifies the amount
// by which the stacksize needs to be updated.
// Special case for the Return. Returns pops 1 if there is a
// non-void return value.
// Update the running stacksize. m_maxMidStack specifies the maximum
// amount of stack required for the current basic block irrespective of
// where you enter the block.
m_maxMidStackCur += stackchange;
if (m_maxMidStackCur > m_maxMidStack)
m_maxMidStack = m_maxMidStackCur;
else if (m_maxMidStackCur < 0)
m_maxMidStackCur = 0;
// If the current instruction signifies end of a basic, which basically
// means an unconditional branch, add m_maxMidStack to m_maxStackSize.
// m_maxStackSize will eventually be the sum of the stack requirements for
// each basic block.
if (opcode.EndsUncondJmpBlk())
{
m_maxStackSize += m_maxMidStack;
m_maxMidStack = 0;
m_maxMidStackCur = 0;
}
}
示例2: UpdateStackSize
internal void UpdateStackSize(OpCode opcode, int stackchange)
{
this.m_maxMidStackCur += stackchange;
if (this.m_maxMidStackCur > this.m_maxMidStack)
{
this.m_maxMidStack = this.m_maxMidStackCur;
}
else if (this.m_maxMidStackCur < 0)
{
this.m_maxMidStackCur = 0;
}
if (opcode.EndsUncondJmpBlk())
{
this.m_maxStackSize += this.m_maxMidStack;
this.m_maxMidStack = 0;
this.m_maxMidStackCur = 0;
}
}