OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.js_model.elements; | 5 library dart2js.js_model.elements; |
6 | 6 |
7 import '../common_elements.dart'; | 7 import '../common_elements.dart'; |
8 import '../constants/constant_system.dart'; | 8 import '../constants/constant_system.dart'; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../elements/entities.dart'; | 10 import '../elements/entities.dart'; |
11 import '../elements/names.dart'; | 11 import '../elements/names.dart'; |
12 import '../elements/types.dart'; | 12 import '../elements/types.dart'; |
13 import '../js_backend/backend_usage.dart'; | 13 import '../js_backend/backend_usage.dart'; |
14 import '../js_backend/interceptor_data.dart'; | 14 import '../js_backend/interceptor_data.dart'; |
15 import '../js_backend/native_data.dart'; | 15 import '../js_backend/native_data.dart'; |
16 import '../kernel/elements.dart'; | 16 import '../kernel/elements.dart'; |
17 import '../kernel/element_map_impl.dart'; | 17 import '../kernel/element_map_impl.dart'; |
18 import '../native/behavior.dart'; | 18 import '../native/behavior.dart'; |
19 import '../universe/class_set.dart'; | 19 import '../universe/class_set.dart'; |
20 import '../universe/world_builder.dart'; | |
21 import '../world.dart'; | 20 import '../world.dart'; |
22 | 21 |
23 /// Bidirectional map between 'frontend' and 'backend' elements. | 22 /// Bidirectional map between 'frontend' and 'backend' elements. |
24 /// | 23 /// |
25 /// Frontend elements are what we read in, these typically represents concepts | 24 /// Frontend elements are what we read in, these typically represents concepts |
26 /// in Dart. Backend elements are what we generate, these may include elements | 25 /// in Dart. Backend elements are what we generate, these may include elements |
27 /// that do not correspond to a Dart concept, such as closure classes. | 26 /// that do not correspond to a Dart concept, such as closure classes. |
28 /// | 27 /// |
29 /// Querying for the frontend element for a backend-only element throws an | 28 /// Querying for the frontend element for a backend-only element throws an |
30 /// exception. | 29 /// exception. |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 final JsKernelToElementMap elementMap; | 521 final JsKernelToElementMap elementMap; |
523 | 522 |
524 JsClosedWorld(this.elementMap, | 523 JsClosedWorld(this.elementMap, |
525 {ElementEnvironment elementEnvironment, | 524 {ElementEnvironment elementEnvironment, |
526 DartTypes dartTypes, | 525 DartTypes dartTypes, |
527 CommonElements commonElements, | 526 CommonElements commonElements, |
528 ConstantSystem constantSystem, | 527 ConstantSystem constantSystem, |
529 NativeData nativeData, | 528 NativeData nativeData, |
530 InterceptorData interceptorData, | 529 InterceptorData interceptorData, |
531 BackendUsage backendUsage, | 530 BackendUsage backendUsage, |
532 ResolutionWorldBuilder resolutionWorldBuilder, | |
533 Set<ClassEntity> implementedClasses, | 531 Set<ClassEntity> implementedClasses, |
534 Iterable<MemberEntity> liveInstanceMembers, | 532 Iterable<MemberEntity> liveInstanceMembers, |
| 533 Iterable<MemberEntity> assignedInstanceMembers, |
535 Set<TypedefElement> allTypedefs, | 534 Set<TypedefElement> allTypedefs, |
536 Map<ClassEntity, Set<ClassEntity>> mixinUses, | 535 Map<ClassEntity, Set<ClassEntity>> mixinUses, |
537 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses, | 536 Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses, |
538 Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes, | 537 Map<ClassEntity, ClassHierarchyNode> classHierarchyNodes, |
539 Map<ClassEntity, ClassSet> classSets}) | 538 Map<ClassEntity, ClassSet> classSets}) |
540 : super( | 539 : super( |
541 elementEnvironment, | 540 elementEnvironment, |
542 dartTypes, | 541 dartTypes, |
543 commonElements, | 542 commonElements, |
544 constantSystem, | 543 constantSystem, |
545 nativeData, | 544 nativeData, |
546 interceptorData, | 545 interceptorData, |
547 backendUsage, | 546 backendUsage, |
548 resolutionWorldBuilder, | |
549 implementedClasses, | 547 implementedClasses, |
550 liveInstanceMembers, | 548 liveInstanceMembers, |
| 549 assignedInstanceMembers, |
551 allTypedefs, | 550 allTypedefs, |
552 mixinUses, | 551 mixinUses, |
553 typesImplementedBySubclasses, | 552 typesImplementedBySubclasses, |
554 classHierarchyNodes, | 553 classHierarchyNodes, |
555 classSets); | 554 classSets); |
556 | 555 |
557 @override | 556 @override |
558 void registerClosureClass(ClassElement cls) { | 557 void registerClosureClass(ClassElement cls) { |
559 throw new UnimplementedError('JsClosedWorld.registerClosureClass'); | 558 throw new UnimplementedError('JsClosedWorld.registerClosureClass'); |
560 } | 559 } |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 | 720 |
722 @override | 721 @override |
723 bool get isFunctionApplyUsed => _backendUsage.isFunctionApplyUsed; | 722 bool get isFunctionApplyUsed => _backendUsage.isFunctionApplyUsed; |
724 | 723 |
725 @override | 724 @override |
726 bool get isMirrorsUsed => _backendUsage.isMirrorsUsed; | 725 bool get isMirrorsUsed => _backendUsage.isMirrorsUsed; |
727 | 726 |
728 @override | 727 @override |
729 bool get isNoSuchMethodUsed => _backendUsage.isNoSuchMethodUsed; | 728 bool get isNoSuchMethodUsed => _backendUsage.isNoSuchMethodUsed; |
730 } | 729 } |
OLD | NEW |