当前位置: 首页>>代码示例>>C#>>正文


C# OpCode.EndsUncondJmpBlk方法代码示例

本文整理汇总了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;
            }
        }
开发者ID:uQr,项目名称:referencesource,代码行数:29,代码来源:ilgenerator.cs

示例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;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:18,代码来源:ILGenerator.cs


注:本文中的System.Reflection.Emit.OpCode.EndsUncondJmpBlk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。