示例#1
0
        public Expression CompileDynamicCall(CompilationContext context, string selector, string nativeName, bool isSuperSend, bool isConstantReceiver, string superLookupScope,
                                             Expression receiver, Expression executionContext, Expression argument)
        {
            CallSiteBinder binder = CallSiteBinderCache.GetMessageBinder(selector, nativeName, 1, isSuperSend, isConstantReceiver, superLookupScope);

            return(Expression.Dynamic(binder, typeof(Object), receiver, executionContext, argument));
        }
示例#2
0
        public Expression CompileDynamicCall(CompilationContext context, string selector, string nativeName, int argumentCount, bool isSuperSend, bool isConstantReceiver, string superLookupScope,
                                             Expression receiver, Expression executionContext, IEnumerable <Expression> arguments)
        {
            CallSiteBinder    binder = CallSiteBinderCache.GetMessageBinder(selector, nativeName, argumentCount, isSuperSend, isConstantReceiver, superLookupScope);
            List <Expression> args   = new List <Expression>();

            args.Add(receiver);
            args.Add(executionContext);
            args.AddRange(arguments);
            return(Expression.Dynamic(binder, typeof(Object), args));
        }