private bool HasBranchTo(int start, int end, CodeEmitterLabel label)
{
for (int i = start; i < end; i++)
{
if (code[i].HasLabel)
{
if (code[i].Label == label)
{
return true;
}
}
else if (code[i].opcode == OpCodes.Switch)
{
foreach (CodeEmitterLabel swlbl in code[i].Labels)
{
if (swlbl == label)
{
return true;
}
}
}
}
return false;
}