| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library universe; | 5 library universe; |
| 6 | 6 |
| 7 import '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../dart2jslib.dart'; | 8 import '../dart2jslib.dart'; |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../types/types.dart'; | 10 import '../types/types.dart'; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 /*T*/ internalCompileArgument(Node node) { | 445 /*T*/ internalCompileArgument(Node node) { |
| 446 return compileArgument(mapping[node]); | 446 return compileArgument(mapping[node]); |
| 447 } | 447 } |
| 448 | 448 |
| 449 Link<Node> nodes = computeCallNodesFromParameters(); | 449 Link<Node> nodes = computeCallNodesFromParameters(); |
| 450 | 450 |
| 451 // Synthesize a structure for the call. | 451 // Synthesize a structure for the call. |
| 452 // TODO(ngeoffray): Should the resolver do it instead? | 452 // TODO(ngeoffray): Should the resolver do it instead? |
| 453 List<String> namedParameters; | 453 List<String> namedParameters; |
| 454 if (signature.optionalParametersAreNamed) { | 454 if (signature.optionalParametersAreNamed) { |
| 455 namedParameters = signature.optionalParameters.mapToList((e) => e.name); | 455 namedParameters = |
| 456 signature.optionalParameters.map((e) => e.name).toList(); |
| 456 } | 457 } |
| 457 CallStructure callStructure = | 458 CallStructure callStructure = |
| 458 new CallStructure(signature.parameterCount, namedParameters); | 459 new CallStructure(signature.parameterCount, namedParameters); |
| 459 if (!callStructure.signatureApplies(callee)) { | 460 if (!callStructure.signatureApplies(callee)) { |
| 460 return false; | 461 return false; |
| 461 } | 462 } |
| 462 list.addAll(callStructure.makeArgumentsList( | 463 list.addAll(callStructure.makeArgumentsList( |
| 463 nodes, | 464 nodes, |
| 464 callee, | 465 callee, |
| 465 internalCompileArgument, | 466 internalCompileArgument, |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 860 |
| 860 Selector extendIfReachesAll(Compiler compiler) { | 861 Selector extendIfReachesAll(Compiler compiler) { |
| 861 bool canReachAll = compiler.enabledInvokeOn | 862 bool canReachAll = compiler.enabledInvokeOn |
| 862 && mask.needsNoSuchMethodHandling(this, compiler.world); | 863 && mask.needsNoSuchMethodHandling(this, compiler.world); |
| 863 return canReachAll | 864 return canReachAll |
| 864 ? new TypedSelector( | 865 ? new TypedSelector( |
| 865 compiler.typesTask.dynamicType, this, compiler.world) | 866 compiler.typesTask.dynamicType, this, compiler.world) |
| 866 : this; | 867 : this; |
| 867 } | 868 } |
| 868 } | 869 } |
| OLD | NEW |