| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.call_structure; | 5 library dart2js.call_structure; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Identifiers, Names, Selectors; | 8 import '../common/names.dart' show Names; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| 11 import '../util/util.dart'; | 11 import '../util/util.dart'; |
| 12 | |
| 13 import 'selector.dart' show Selector; | 12 import 'selector.dart' show Selector; |
| 14 | 13 |
| 15 /// The structure of the arguments at a call-site. | 14 /// The structure of the arguments at a call-site. |
| 16 // TODO(johnniwinther): Should these be cached? | 15 // TODO(johnniwinther): Should these be cached? |
| 17 // TODO(johnniwinther): Should isGetter/isSetter be part of the call structure | 16 // TODO(johnniwinther): Should isGetter/isSetter be part of the call structure |
| 18 // instead of the selector? | 17 // instead of the selector? |
| 19 class CallStructure { | 18 class CallStructure { |
| 20 static const CallStructure NO_ARGS = const CallStructure.unnamed(0); | 19 static const CallStructure NO_ARGS = const CallStructure.unnamed(0); |
| 21 static const CallStructure ONE_ARG = const CallStructure.unnamed(1); | 20 static const CallStructure ONE_ARG = const CallStructure.unnamed(1); |
| 22 static const CallStructure TWO_ARGS = const CallStructure.unnamed(2); | 21 static const CallStructure TWO_ARGS = const CallStructure.unnamed(2); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 return first.compareTo(second); | 275 return first.compareTo(second); |
| 277 }); | 276 }); |
| 278 return _orderedNamedArguments; | 277 return _orderedNamedArguments; |
| 279 } | 278 } |
| 280 | 279 |
| 281 @override | 280 @override |
| 282 String structureToString() { | 281 String structureToString() { |
| 283 return 'arity=$argumentCount, named=[${namedArguments.join(', ')}]'; | 282 return 'arity=$argumentCount, named=[${namedArguments.join(', ')}]'; |
| 284 } | 283 } |
| 285 } | 284 } |
| OLD | NEW |