void EmitDefaultBranch(bool branch, Expression condition, Label label)
{
if (branch && IsOneEquivalent(condition))
{
_il.Emit(OpCodes.Br, label);
return;
}
if (!branch && IsZeroEquivalent(condition))
{
_il.Emit(OpCodes.Br, label);
return;
}
condition.Accept(this);
var type = PopType();
if (TypeSystemServices.IsFloatingPointNumber(type))
{
EmitDefaultValue(type);
_il.Emit(branch ? OpCodes.Bne_Un : OpCodes.Beq, label);
return;
}
EmitToBoolIfNeeded(condition);
_il.Emit(branch ? OpCodes.Brtrue : OpCodes.Brfalse, label);
}