3b39c2637b
Currently _emitArgumentList handles arguments for Dart members, JS interop members, and object literal constructors. It requires an Arguments node, which we end up synthesizing, which messes with parent pointers erroneously. We also have to separate out the arguments and do additional checks later to detect whether the arguments passed correspond to an object literal constructor. Instead, we should create the resulting expression directly in a helper method. A map is passed so that the names of arguments can be easily changed when we handle @JS renaming on object literal constructors. Lastly, we need to avoid wrapping the values with assertInterop in the case where the constructor is from a dart:js_interop interface. That library only statically allows Functions to be passed if they're externalized, in which case we shouldn't tell users to wrap the Function with allowInterop (which doesn't exist anyways in dart:js_interop). Change-Id: If6fdc706e80837ab2b698cca704ffd9f08aed28a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446184 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com>