public virtual void Visit(MethodCallValue operand) { IMethodRef method = operand.Method; ITypeRef retType = method.ReturnType; // FIXME: this should be handled within conversions bool needConversion = retType.IsPrimitive; operand.Parent().Accept(this); bool oldInArithmetic = _inArithmetic; for (int paramIdx = 0; paramIdx < operand.Args.Length; paramIdx++) { _inArithmetic = operand.Method.ParamTypes[paramIdx].IsPrimitive; operand.Args[paramIdx].Accept(this); } _inArithmetic = oldInArithmetic; _methodBuilder.Invoke(method, operand.CallingConvention); Box(retType, !_inArithmetic && needConversion); }
private void Invoke(IMethodRef method) { _builder.Invoke(method, CallingConvention.Interface); }