| 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 elements; | 5 library elements; |
| 6 | 6 |
| 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' | 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' |
| 8 show AsyncModifier; | 8 show AsyncModifier; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 * Precondition: `callStructure.signatureApplies(element.type)`. | 819 * Precondition: `callStructure.signatureApplies(element.type)`. |
| 820 * | 820 * |
| 821 * Invariant: [element] must be the implementation element. | 821 * Invariant: [element] must be the implementation element. |
| 822 */ | 822 */ |
| 823 static List<T> makeArgumentsList<T>( | 823 static List<T> makeArgumentsList<T>( |
| 824 CallStructure callStructure, | 824 CallStructure callStructure, |
| 825 Link<Node> arguments, | 825 Link<Node> arguments, |
| 826 FunctionElement element, | 826 FunctionElement element, |
| 827 T compileArgument(Node argument), | 827 T compileArgument(Node argument), |
| 828 T compileDefaultValue(ParameterElement element)) { | 828 T compileDefaultValue(ParameterElement element)) { |
| 829 assert(invariant(element, element.isImplementation)); | 829 assert(element.isImplementation, failedAt(element)); |
| 830 List<T> result = <T>[]; | 830 List<T> result = <T>[]; |
| 831 | 831 |
| 832 FunctionSignature parameters = element.functionSignature; | 832 FunctionSignature parameters = element.functionSignature; |
| 833 parameters.forEachRequiredParameter((ParameterElement element) { | 833 parameters.forEachRequiredParameter((ParameterElement element) { |
| 834 result.add(compileArgument(arguments.head)); | 834 result.add(compileArgument(arguments.head)); |
| 835 arguments = arguments.tail; | 835 arguments = arguments.tail; |
| 836 }); | 836 }); |
| 837 | 837 |
| 838 if (!parameters.optionalParametersAreNamed) { | 838 if (!parameters.optionalParametersAreNamed) { |
| 839 parameters.forEachOptionalParameter((ParameterElement element) { | 839 parameters.forEachOptionalParameter((ParameterElement element) { |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 /// by a field. | 2032 /// by a field. |
| 2033 bool get isDeclaredByField; | 2033 bool get isDeclaredByField; |
| 2034 | 2034 |
| 2035 /// Returns `true` if this member is abstract. | 2035 /// Returns `true` if this member is abstract. |
| 2036 bool get isAbstract; | 2036 bool get isAbstract; |
| 2037 | 2037 |
| 2038 /// If abstract, [implementation] points to the overridden concrete member, | 2038 /// If abstract, [implementation] points to the overridden concrete member, |
| 2039 /// if any. Otherwise [implementation] points to the member itself. | 2039 /// if any. Otherwise [implementation] points to the member itself. |
| 2040 Member get implementation; | 2040 Member get implementation; |
| 2041 } | 2041 } |
| OLD | NEW |