| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.modelx; | 5 library elements.modelx; |
| 6 | 6 |
| 7 import 'dart:uri'; | 7 import 'dart:uri'; |
| 8 import 'dart:collection' show LinkedHashMap; | 8 import 'dart:collection' show LinkedHashMap; |
| 9 | 9 |
| 10 import 'elements.dart'; | 10 import 'elements.dart'; |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 List<Element> list = new List<Element>.from(optionalParameters); | 1061 List<Element> list = new List<Element>.from(optionalParameters); |
| 1062 if (optionalParametersAreNamed) { | 1062 if (optionalParametersAreNamed) { |
| 1063 list.sort((Element a, Element b) { | 1063 list.sort((Element a, Element b) { |
| 1064 return a.name.slowToString().compareTo(b.name.slowToString()); | 1064 return a.name.slowToString().compareTo(b.name.slowToString()); |
| 1065 }); | 1065 }); |
| 1066 } | 1066 } |
| 1067 _orderedOptionalParameters = list; | 1067 _orderedOptionalParameters = list; |
| 1068 return list; | 1068 return list; |
| 1069 } | 1069 } |
| 1070 | 1070 |
| 1071 Element get firstOptionalParameter => optionalParameters.head; |
| 1072 |
| 1071 void forEachParameter(void function(Element parameter)) { | 1073 void forEachParameter(void function(Element parameter)) { |
| 1072 forEachRequiredParameter(function); | 1074 forEachRequiredParameter(function); |
| 1073 forEachOptionalParameter(function); | 1075 forEachOptionalParameter(function); |
| 1074 } | 1076 } |
| 1075 | 1077 |
| 1076 void orderedForEachParameter(void function(Element parameter)) { | 1078 void orderedForEachParameter(void function(Element parameter)) { |
| 1077 forEachRequiredParameter(function); | 1079 forEachRequiredParameter(function); |
| 1078 orderedOptionalParameters.forEach(function); | 1080 orderedOptionalParameters.forEach(function); |
| 1079 } | 1081 } |
| 1080 | 1082 |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 | 2018 |
| 2017 MetadataAnnotation ensureResolved(Compiler compiler) { | 2019 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 2018 if (resolutionState == STATE_NOT_STARTED) { | 2020 if (resolutionState == STATE_NOT_STARTED) { |
| 2019 compiler.resolver.resolveMetadataAnnotation(this); | 2021 compiler.resolver.resolveMetadataAnnotation(this); |
| 2020 } | 2022 } |
| 2021 return this; | 2023 return this; |
| 2022 } | 2024 } |
| 2023 | 2025 |
| 2024 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2026 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 2025 } | 2027 } |
| OLD | NEW |