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/names.dart' show Identifiers, Uris; | 8 import 'common/names.dart' show Identifiers, Uris; |
9 import 'constants/values.dart'; | 9 import 'constants/values.dart'; |
10 import 'elements/entities.dart'; | 10 import 'elements/entities.dart'; |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 | 1137 |
1138 ClassEntity get expectTrustTypeAnnotationsClass { | 1138 ClassEntity get expectTrustTypeAnnotationsClass { |
1139 _ensureExpectAnnotations(); | 1139 _ensureExpectAnnotations(); |
1140 return _expectTrustTypeAnnotationsClass; | 1140 return _expectTrustTypeAnnotationsClass; |
1141 } | 1141 } |
1142 | 1142 |
1143 ClassEntity get expectAssumeDynamicClass { | 1143 ClassEntity get expectAssumeDynamicClass { |
1144 _ensureExpectAnnotations(); | 1144 _ensureExpectAnnotations(); |
1145 return _expectAssumeDynamicClass; | 1145 return _expectAssumeDynamicClass; |
1146 } | 1146 } |
| 1147 |
| 1148 bool isForeign(MemberEntity element) => element.library == foreignLibrary; |
1147 } | 1149 } |
1148 | 1150 |
1149 /// Interface for accessing libraries, classes and members. | 1151 /// Interface for accessing libraries, classes and members. |
1150 /// | 1152 /// |
1151 /// The element environment makes private and injected members directly | 1153 /// The element environment makes private and injected members directly |
1152 /// available and should therefore not be used to determine scopes. | 1154 /// available and should therefore not be used to determine scopes. |
1153 /// | 1155 /// |
1154 /// The properties exposed are Dart-centric and should therefore, long-term, not | 1156 /// The properties exposed are Dart-centric and should therefore, long-term, not |
1155 /// be used during codegen, expect for mirrors. | 1157 /// be used during codegen, expect for mirrors. |
1156 // TODO(johnniwinther): Split this into an element environment and a type query | 1158 // TODO(johnniwinther): Split this into an element environment and a type query |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 // TODO(johnniwinther): Remove this when the resolver is removed. | 1295 // TODO(johnniwinther): Remove this when the resolver is removed. |
1294 DartType getUnaliasedType(DartType type); | 1296 DartType getUnaliasedType(DartType type); |
1295 | 1297 |
1296 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected | 1298 /// Returns `true` if [member] a the synthetic getter `loadLibrary` injected |
1297 /// on deferred libraries. | 1299 /// on deferred libraries. |
1298 bool isDeferredLoadLibraryGetter(MemberEntity member); | 1300 bool isDeferredLoadLibraryGetter(MemberEntity member); |
1299 | 1301 |
1300 /// Returns the metadata constants declared on [member]. | 1302 /// Returns the metadata constants declared on [member]. |
1301 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); | 1303 Iterable<ConstantValue> getMemberMetadata(MemberEntity member); |
1302 } | 1304 } |
OLD | NEW |