| 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.selector; | 5 library dart2js.selector; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show Names; | 8 import '../common/names.dart' show Names; |
| 9 import '../elements/elements.dart' | 9 import '../elements/elements.dart' |
| 10 show | 10 show |
| 11 Element, | 11 Element, |
| 12 Elements, | 12 Elements, |
| 13 FunctionElement, | 13 FunctionElement, |
| 14 FunctionSignature, | 14 FunctionSignature, |
| 15 Name, | 15 Name, |
| 16 LibraryElement, | 16 LibraryElement, |
| 17 PublicName; | 17 PublicName; |
| 18 import '../util/util.dart' show Hashing; | 18 import '../util/util.dart' show Hashing; |
| 19 import '../world.dart' show World; | 19 import '../world.dart' show World; |
| 20 | |
| 21 import 'call_structure.dart' show CallStructure; | 20 import 'call_structure.dart' show CallStructure; |
| 22 | 21 |
| 23 class SelectorKind { | 22 class SelectorKind { |
| 24 final String name; | 23 final String name; |
| 25 final int hashCode; | 24 final int hashCode; |
| 26 const SelectorKind(this.name, this.hashCode); | 25 const SelectorKind(this.name, this.hashCode); |
| 27 | 26 |
| 28 static const SelectorKind GETTER = const SelectorKind('getter', 0); | 27 static const SelectorKind GETTER = const SelectorKind('getter', 0); |
| 29 static const SelectorKind SETTER = const SelectorKind('setter', 1); | 28 static const SelectorKind SETTER = const SelectorKind('setter', 1); |
| 30 static const SelectorKind CALL = const SelectorKind('call', 2); | 29 static const SelectorKind CALL = const SelectorKind('call', 2); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // Add bits from the call structure. | 271 // Add bits from the call structure. |
| 273 return Hashing.mixHashCodeBits(hash, callStructure.hashCode); | 272 return Hashing.mixHashCodeBits(hash, callStructure.hashCode); |
| 274 } | 273 } |
| 275 | 274 |
| 276 String toString() { | 275 String toString() { |
| 277 return 'Selector($kind, $name, ${callStructure.structureToString()})'; | 276 return 'Selector($kind, $name, ${callStructure.structureToString()})'; |
| 278 } | 277 } |
| 279 | 278 |
| 280 Selector toCallSelector() => new Selector.callClosureFrom(this); | 279 Selector toCallSelector() => new Selector.callClosureFrom(this); |
| 281 } | 280 } |
| OLD | NEW |