OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // TODO(sigmund): rename and move to common/elements.dart | 5 // TODO(sigmund): rename and move to common/elements.dart |
6 library dart2js.type_system; | 6 library dart2js.type_system; |
7 | 7 |
8 import 'common.dart'; | 8 import 'common.dart'; |
9 import 'common/names.dart' show Identifiers, Uris; | 9 import 'common/names.dart' show Identifiers, Uris; |
10 import 'constants/values.dart'; | 10 import 'constants/values.dart'; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 217 |
218 /// Whether [element] is the same as [functionApplyMethod]. This will not | 218 /// Whether [element] is the same as [functionApplyMethod]. This will not |
219 /// resolve the apply method if it hasn't been seen yet during compilation. | 219 /// resolve the apply method if it hasn't been seen yet during compilation. |
220 bool isFunctionApplyMethod(MemberEntity element) => | 220 bool isFunctionApplyMethod(MemberEntity element) => |
221 element.name == 'apply' && element.enclosingClass == functionClass; | 221 element.name == 'apply' && element.enclosingClass == functionClass; |
222 | 222 |
223 /// Returns `true` if [element] is the unnamed constructor of `List`. This | 223 /// Returns `true` if [element] is the unnamed constructor of `List`. This |
224 /// will not resolve the constructor if it hasn't been seen yet during | 224 /// will not resolve the constructor if it hasn't been seen yet during |
225 /// compilation. | 225 /// compilation. |
226 bool isUnnamedListConstructor(ConstructorEntity element) => | 226 bool isUnnamedListConstructor(ConstructorEntity element) => |
227 element.name == '' && element.enclosingClass == listClass; | 227 (element.name == '' && element.enclosingClass == listClass) || |
| 228 (element.name == 'list' && element.enclosingClass == jsArrayClass); |
228 | 229 |
229 /// Returns `true` if [element] is the 'filled' constructor of `List`. This | 230 /// Returns `true` if [element] is the 'filled' constructor of `List`. This |
230 /// will not resolve the constructor if it hasn't been seen yet during | 231 /// will not resolve the constructor if it hasn't been seen yet during |
231 /// compilation. | 232 /// compilation. |
232 bool isFilledListConstructor(ConstructorEntity element) => | 233 bool isFilledListConstructor(ConstructorEntity element) => |
233 element.name == 'filled' && element.enclosingClass == listClass; | 234 element.name == 'filled' && element.enclosingClass == listClass; |
234 | 235 |
235 /// The `dynamic` type. | 236 /// The `dynamic` type. |
236 DynamicType get dynamicType => _env.dynamicType; | 237 DynamicType get dynamicType => _env.dynamicType; |
237 | 238 |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 // TODO(johnniwinther): Remove this when the resolver is removed. | 1329 // TODO(johnniwinther): Remove this when the resolver is removed. |
1329 DartType getUnaliasedType(DartType type); | 1330 DartType getUnaliasedType(DartType type); |
1330 | 1331 |
1331 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected | 1332 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected |
1332 /// on deferred libraries. | 1333 /// on deferred libraries. |
1333 bool isDeferredLoadLibraryGetter(MemberEntity member); | 1334 bool isDeferredLoadLibraryGetter(MemberEntity member); |
1334 | 1335 |
1335 /// Returns the metadata constants declared on [member]. | 1336 /// Returns the metadata constants declared on [member]. |
1336 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); | 1337 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); |
1337 } | 1338 } |
OLD | NEW |