| Index: lib/compiler/implementation/universe.dart
|
| diff --git a/lib/compiler/implementation/universe.dart b/lib/compiler/implementation/universe.dart
|
| index 9909fbacdb9eaf43cc55cd6078f273944d8638d0..e989efaab923cfe685d5e2621b1872e0b2699496 100644
|
| --- a/lib/compiler/implementation/universe.dart
|
| +++ b/lib/compiler/implementation/universe.dart
|
| @@ -119,19 +119,20 @@ class Selector implements Hashable {
|
| * Returns [:true:] if the selector and the [element] match; [:false:]
|
| * otherwise.
|
| */
|
| - bool addArgumentsToList(Link<Node> arguments,
|
| - List list,
|
| - FunctionParameters parameters,
|
| - compileArgument(Node argument),
|
| - compileConstant(Element element)) {
|
| - void addMatchingArgumentsToList(Link<Node> link) {
|
| + bool addSendArgumentsToList(Send send,
|
| + List list,
|
| + FunctionParameters parameters,
|
| + compileArgument(Node argument),
|
| + compileConstant(Element element)) {
|
| + void addMatchingSendArgumentsToList(Link<Node> link) {
|
| + for (; !link.isEmpty(); link = link.tail) {
|
| + list.add(compileArgument(link.head));
|
| + }
|
| }
|
|
|
| if (!this.applies(parameters)) return false;
|
| if (this.positionalArgumentCount == parameters.parameterCount) {
|
| - for (Link<Node> link = arguments; !link.isEmpty(); link = link.tail) {
|
| - list.add(compileArgument(link.head));
|
| - }
|
| + addMatchingSendArgumentsToList(send.arguments);
|
| return true;
|
| }
|
|
|
| @@ -139,6 +140,7 @@ class Selector implements Hashable {
|
| // expected by the called function, which is the source order.
|
|
|
| // Visit positional arguments and add them to the list.
|
| + Link<Node> arguments = send.arguments;
|
| int positionalArgumentCount = this.positionalArgumentCount;
|
| for (int i = 0;
|
| i < positionalArgumentCount;
|
|
|