Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: pkg/compiler/lib/src/universe/resolution_world_builder.dart

Issue 3011793002: Add types referenced in is-checks to the class hierarchy (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of world_builder; 5 part of world_builder;
6 6
7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld { 7 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld {
8 /// Set of all local functions in the program. Used by the mirror tracking 8 /// Set of all local functions in the program. Used by the mirror tracking
9 /// system to find all live closure instances. 9 /// system to find all live closure instances.
10 Iterable<Local> get localFunctions; 10 Iterable<Local> get localFunctions;
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 superclass = getSuperClass(superclass); 937 superclass = getSuperClass(superclass);
938 } 938 }
939 } 939 }
940 940
941 // Use the [:seenClasses:] set to include non-instantiated 941 // Use the [:seenClasses:] set to include non-instantiated
942 // classes: if the superclass of these classes require RTI, then 942 // classes: if the superclass of these classes require RTI, then
943 // they also need RTI, so that a constructor passes the type 943 // they also need RTI, so that a constructor passes the type
944 // variables to the super constructor. 944 // variables to the super constructor.
945 forEachInstantiatedClass(addSubtypes); 945 forEachInstantiatedClass(addSubtypes);
946 946
947 void _registerType(DartType type) {
Johnni Winther 2017/09/01 08:21:34 We probably need to visit function types and typed
Harry Terkelsen 2017/09/01 18:48:24 Done.
948 if (type.isInterfaceType) {
949 InterfaceType interface = type;
950 _ensureClassSet(interface.element);
951 interface.typeArguments.forEach(_registerType);
952 }
953 }
954
955 isChecks.forEach(_registerType);
956
947 _classHierarchyNodes.keys.toList().forEach(_ensureClassSet); 957 _classHierarchyNodes.keys.toList().forEach(_ensureClassSet);
948 958
949 return typesImplementedBySubclasses; 959 return typesImplementedBySubclasses;
950 } 960 }
951 961
952 Iterable<MemberEntity> computeAssignedInstanceMembers() { 962 Iterable<MemberEntity> computeAssignedInstanceMembers() {
953 Set<MemberEntity> assignedInstanceMembers = new Set<MemberEntity>(); 963 Set<MemberEntity> assignedInstanceMembers = new Set<MemberEntity>();
954 for (MemberEntity instanceMember in _liveInstanceMembers) { 964 for (MemberEntity instanceMember in _liveInstanceMembers) {
955 if (hasInvokedSetter(instanceMember)) { 965 if (hasInvokedSetter(instanceMember)) {
956 assignedInstanceMembers.add(instanceMember); 966 assignedInstanceMembers.add(instanceMember);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 typesImplementedBySubclasses: typesImplementedBySubclasses, 1033 typesImplementedBySubclasses: typesImplementedBySubclasses,
1024 classHierarchyNodes: _classHierarchyNodes, 1034 classHierarchyNodes: _classHierarchyNodes,
1025 classSets: _classSets); 1035 classSets: _classSets);
1026 } 1036 }
1027 1037
1028 @override 1038 @override
1029 void registerClass(ClassEntity cls) { 1039 void registerClass(ClassEntity cls) {
1030 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass'); 1040 throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass');
1031 } 1041 }
1032 } 1042 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698