本文整理汇总了C#中Mono.Cecil.Cil.Instruction.IsUnconditionalBranch方法的典型用法代码示例。如果您正苦于以下问题:C# Instruction.IsUnconditionalBranch方法的具体用法?C# Instruction.IsUnconditionalBranch怎么用?C# Instruction.IsUnconditionalBranch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Cecil.Cil.Instruction
的用法示例。
在下文中一共展示了Instruction.IsUnconditionalBranch方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteInstruction
//.........这里部分代码省略.........
case Code.Leave_S:
break;
case Code.Stind_I:
break;
case Code.Conv_U:
break;
case Code.Arglist:
break;
case Code.Ceq:
break;
case Code.Cgt:
break;
case Code.Cgt_Un:
break;
case Code.Clt:
break;
case Code.Clt_Un:
break;
case Code.Ldftn:
break;
case Code.Ldvirtftn:
break;
case Code.Ldarg:
break;
case Code.Ldarga:
break;
case Code.Starg:
break;
case Code.Ldloc:
break;
case Code.Ldloca:
break;
case Code.Stloc:
break;
case Code.Localloc:
break;
case Code.Endfilter:
break;
case Code.Unaligned:
break;
case Code.Volatile:
break;
case Code.Tail:
break;
case Code.Initobj:
break;
case Code.Constrained:
break;
case Code.Cpblk:
break;
case Code.Initblk:
break;
case Code.No:
break;
case Code.Rethrow:
break;
case Code.Sizeof:
break;
case Code.Refanytype:
break;
case Code.Readonly:
break;
default:
wasExactInstructionProcessed = false;
break;
}
#endregion
_currentCount++;
Snapshots.Add(new Snapshot(new Stack<StackEntry>(Stack), new Dictionary<int, LocalEntry>(_locals),
instruction, _methodBody, Snapshots[Snapshots.Count -1]));
if (!wasExactInstructionProcessed)
{
switch (instruction.OpCode.StackBehaviourPush)
{
case StackBehaviour.Push0:
case StackBehaviour.Push1:
case StackBehaviour.Pushi:
case StackBehaviour.Pushi8:
case StackBehaviour.Pushr4:
case StackBehaviour.Pushr8:
case StackBehaviour.Pushref:
_stack.Push(new StackEntry(instruction, true, instruction.Operand));
break;
case StackBehaviour.Push1_push1:
_stack.Push(new StackEntry(instruction, false));
_stack.Push(new StackEntry(instruction, false));
break;
}
if (instruction.IsUnconditionalBranch())
{
return _methodBody.Instructions.IndexOf(instruction);
}
}
return ++_instructionPointer;
}
示例2: OnFunc
private static bool OnFunc(Instruction instr)
{
return instr.IsUnconditionalBranch();
}