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 containing identifier, names, and selectors commonly used through | 5 /// Library containing identifier, names, and selectors commonly used through |
6 /// the compiler. | 6 /// the compiler. |
7 library dart2js.common.names; | 7 library dart2js.common.names; |
8 | 8 |
9 import '../elements/elements.dart' show | 9 import '../elements/elements.dart' show |
10 Name, | 10 Name, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 static final Selector hashCode_ = | 102 static final Selector hashCode_ = |
103 new Selector.getter(const PublicName('hashCode')); | 103 new Selector.getter(const PublicName('hashCode')); |
104 | 104 |
105 static final Selector compareTo = | 105 static final Selector compareTo = |
106 new Selector.call(const PublicName("compareTo"), CallStructure.ONE_ARG); | 106 new Selector.call(const PublicName("compareTo"), CallStructure.ONE_ARG); |
107 | 107 |
108 static final Selector equals = new Selector.binaryOperator('=='); | 108 static final Selector equals = new Selector.binaryOperator('=='); |
109 | 109 |
110 static final Selector length = new Selector.getter(Names.length); | 110 static final Selector length = new Selector.getter(Names.length); |
| 111 |
| 112 /// List of all the selectors held in static fields. |
| 113 /// |
| 114 /// These objects are shared between different runs in batch-mode and must |
| 115 /// thus remain in the [Selector.canonicalizedValues] map. |
| 116 static final List<Selector> ALL = <Selector>[ |
| 117 cancel, current, iterator, moveNext, noSuchMethod_, toString_, |
| 118 hashCode_, compareTo, equals, length]; |
111 } | 119 } |
112 | 120 |
113 /// [Uri]s commonly used. | 121 /// [Uri]s commonly used. |
114 class Uris { | 122 class Uris { |
115 /// The URI for 'dart:async'. | 123 /// The URI for 'dart:async'. |
116 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async'); | 124 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async'); |
117 | 125 |
118 /// The URI for 'dart:core'. | 126 /// The URI for 'dart:core'. |
119 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core'); | 127 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core'); |
120 | 128 |
121 /// The URI for 'dart:html'. | 129 /// The URI for 'dart:html'. |
122 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html'); | 130 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html'); |
123 | 131 |
124 /// The URI for 'dart:mirrors'. | 132 /// The URI for 'dart:mirrors'. |
125 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors'); | 133 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors'); |
126 | 134 |
127 /// The URI for 'dart:_internal'. | 135 /// The URI for 'dart:_internal'. |
128 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal'); | 136 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal'); |
129 | 137 |
130 /// The URI for 'dart:_native_typed_data'. | 138 /// The URI for 'dart:_native_typed_data'. |
131 static final Uri dart__native_typed_data = | 139 static final Uri dart__native_typed_data = |
132 new Uri(scheme: 'dart', path: '_native_typed_data'); | 140 new Uri(scheme: 'dart', path: '_native_typed_data'); |
133 } | 141 } |
OLD | NEW |