void InvokeRegularMethod(IMethod method, MethodInfo mi, MethodInvocationExpression node)
{
// Do not emit call if conditional attributes (if any) do not match defined symbols
if (!CheckConditionalAttributes(method))
{
EmitNop();
PushType(method.ReturnType); // keep a valid state
return;
}
IType targetType = null;
Expression target = null;
if (!mi.IsStatic)
{
target = GetTargetObject(node);
targetType = target.ExpressionType;
PushTargetObjectFor(mi, target, targetType);
}
PushArguments(method, node.Arguments);
// Emit a constrained call if target is a generic parameter
if (targetType != null && targetType is IGenericParameter)
_il.Emit(OpCodes.Constrained, GetSystemType(targetType));
_il.EmitCall(GetCallOpCode(target, method), mi, null);
PushType(method.ReturnType);
}