private bool IsTerminatingInstruction(CILInstruction cilInstr)
{
// Return or throw instructions are terminating instructions
if (cilInstr is Instr) {
if (((Instr)cilInstr).GetOp() == Op.ret) return true;
if (((Instr)cilInstr).GetOp() == Op.throwOp) return true;
if (((Instr)cilInstr).GetOp() == Op.rethrow) return true;
}
// jmp is a terminating instruction
if (cilInstr is MethInstr) {
if (((MethInstr)cilInstr).GetMethodOp() == MethodOp.jmp) return true;
}
return false;
}