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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 111 |
112 static final Selector codeUnitAt = | 112 static final Selector codeUnitAt = |
113 new Selector.call(const PublicName('codeUnitAt'), CallStructure.ONE_ARG); | 113 new Selector.call(const PublicName('codeUnitAt'), CallStructure.ONE_ARG); |
114 | 114 |
| 115 static final Selector index = new Selector.index(); |
| 116 |
115 /// List of all the selectors held in static fields. | 117 /// List of all the selectors held in static fields. |
116 /// | 118 /// |
117 /// These objects are shared between different runs in batch-mode and must | 119 /// These objects are shared between different runs in batch-mode and must |
118 /// thus remain in the [Selector.canonicalizedValues] map. | 120 /// thus remain in the [Selector.canonicalizedValues] map. |
119 static final List<Selector> ALL = <Selector>[ | 121 static final List<Selector> ALL = <Selector>[ |
120 cancel, current, iterator, moveNext, noSuchMethod_, toString_, | 122 cancel, current, iterator, moveNext, noSuchMethod_, toString_, |
121 hashCode_, compareTo, equals, length, codeUnitAt]; | 123 hashCode_, compareTo, equals, length, codeUnitAt, index]; |
122 } | 124 } |
123 | 125 |
124 /// [Uri]s commonly used. | 126 /// [Uri]s commonly used. |
125 class Uris { | 127 class Uris { |
126 /// The URI for 'dart:async'. | 128 /// The URI for 'dart:async'. |
127 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async'); | 129 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async'); |
128 | 130 |
129 /// The URI for 'dart:core'. | 131 /// The URI for 'dart:core'. |
130 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core'); | 132 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core'); |
131 | 133 |
132 /// The URI for 'dart:html'. | 134 /// The URI for 'dart:html'. |
133 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html'); | 135 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html'); |
134 | 136 |
135 /// The URI for 'dart:mirrors'. | 137 /// The URI for 'dart:mirrors'. |
136 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors'); | 138 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors'); |
137 | 139 |
138 /// The URI for 'dart:_internal'. | 140 /// The URI for 'dart:_internal'. |
139 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal'); | 141 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal'); |
140 | 142 |
141 /// The URI for 'dart:_native_typed_data'. | 143 /// The URI for 'dart:_native_typed_data'. |
142 static final Uri dart__native_typed_data = | 144 static final Uri dart__native_typed_data = |
143 new Uri(scheme: 'dart', path: '_native_typed_data'); | 145 new Uri(scheme: 'dart', path: '_native_typed_data'); |
144 } | 146 } |
OLD | NEW |