{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/3245","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/3245/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/3245/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/3245/events","html_url":"https://github.com/dotnet/corefx/issues/3245","id":106464896,"number":3245,"title":"Add N-ary internal specializations for InvocationExpression","user":{"login":"bartdesmet","id":7324746,"avatar_url":"https://avatars.githubusercontent.com/u/7324746?v=3","gravatar_id":"","url":"https://api.github.com/users/bartdesmet","html_url":"https://github.com/bartdesmet","followers_url":"https://api.github.com/users/bartdesmet/followers","following_url":"https://api.github.com/users/bartdesmet/following{/other_user}","gists_url":"https://api.github.com/users/bartdesmet/gists{/gist_id}","starred_url":"https://api.github.com/users/bartdesmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartdesmet/subscriptions","organizations_url":"https://api.github.com/users/bartdesmet/orgs","repos_url":"https://api.github.com/users/bartdesmet/repos","events_url":"https://api.github.com/users/bartdesmet/events{/privacy}","received_events_url":"https://api.github.com/users/bartdesmet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-15T02:35:36Z","updated_at":"2015-09-15T02:35:36Z","closed_at":null,"body":"In Bing, we use an expression normal form whereby method call expressions etc. get erased for invocation expressions of an unbound parameter, e.g.:\r\n\r\nExpression.Call(where, xs, filter)\r\n\r\nbecomes\r\n\r\nExpression.Invoke(Expression.Parameter(typeof(...), \"where\"), xs, filter)\r\n\r\nThis is done to decouple client libraries and service libraries through erasure of MemberInfo objects. The service uses a binder to bind the unbound parameter expression to a service-side definition and beta-reduced the invocation of the (lambda-based) definition.\r\n\r\nA lot of those invocation expressions have 0, 1, 2, 3 arguments. However, unlike MethodCallExpression, InvocationExpression has no N-ary specializations that help to reduce memory. The proposal is to add such specializations to conserve memory."}}