| Index: sdk/lib/_internal/compiler/implementation/universe/universe.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/universe/universe.dart b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
|
| index 896233cd430ee504c4d0d1a8fe6d76f705145156..b233a369e32cc2ce71c63711fbd7762d7845b549 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/universe/universe.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
|
| @@ -395,12 +395,12 @@ class Selector {
|
| }
|
|
|
| /**
|
| - * Fills [list] with the arguments in a defined order.
|
| + * Fills [list] with the arguments in the normalized order.
|
| *
|
| * [compileArgument] is a function that returns a compiled version
|
| * of an argument located in [arguments].
|
| *
|
| - * [compileConstant] is a function that returns a compiled constant
|
| + * [compileDefaultValue] is a function that returns a compiled constant
|
| * of an optional argument that is not in [arguments].
|
| *
|
| * Returns [:true:] if the selector and the [element] match; [:false:]
|
| @@ -408,28 +408,29 @@ class Selector {
|
| *
|
| * Invariant: [element] must be the implementation element.
|
| */
|
| - bool addArgumentsToList(Link<Node> arguments,
|
| - List list,
|
| - FunctionElement element,
|
| - compileArgument(Node argument),
|
| - compileConstant(Element element),
|
| - World world) {
|
| + /*<T>*/ bool addArgumentsToList(
|
| + Link<Node> arguments,
|
| + List/*<T>*/ list,
|
| + FunctionElement element,
|
| + /*T*/ compileArgument(Node argument),
|
| + /*T*/ compileDefaultValue(ParameterElement element),
|
| + World world) {
|
| assert(invariant(element, element.isImplementation));
|
| if (!this.applies(element, world)) return false;
|
|
|
| FunctionSignature parameters = element.functionSignature;
|
| - parameters.forEachRequiredParameter((element) {
|
| + parameters.forEachRequiredParameter((ParameterElement element) {
|
| list.add(compileArgument(arguments.head));
|
| arguments = arguments.tail;
|
| });
|
|
|
| if (!parameters.optionalParametersAreNamed) {
|
| - parameters.forEachOptionalParameter((element) {
|
| + parameters.forEachOptionalParameter((ParameterElement element) {
|
| if (!arguments.isEmpty) {
|
| list.add(compileArgument(arguments.head));
|
| arguments = arguments.tail;
|
| } else {
|
| - list.add(compileConstant(element));
|
| + list.add(compileDefaultValue(element));
|
| }
|
| });
|
| } else {
|
| @@ -442,12 +443,12 @@ class Selector {
|
| // Iterate over the optional parameters of the signature, and try to
|
| // find them in [compiledNamedArguments]. If found, we use the
|
| // value in the temporary list, otherwise the default value.
|
| - parameters.orderedOptionalParameters.forEach((element) {
|
| + parameters.orderedOptionalParameters.forEach((ParameterElement element) {
|
| int foundIndex = namedArguments.indexOf(element.name);
|
| if (foundIndex != -1) {
|
| list.add(compiledNamedArguments[foundIndex]);
|
| } else {
|
| - list.add(compileConstant(element));
|
| + list.add(compileDefaultValue(element));
|
| }
|
| });
|
| }
|
|
|