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

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

Issue 2625713002: Rename Enqueuer.universe to worldBuilder. (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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 | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/world.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 universe; 5 library universe;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import '../cache_strategy.dart'; 9 import '../cache_strategy.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 abstract class WorldBuilder { 152 abstract class WorldBuilder {
153 /// All directly instantiated classes, that is, classes with a generative 153 /// All directly instantiated classes, that is, classes with a generative
154 /// constructor that has been called directly and not only through a 154 /// constructor that has been called directly and not only through a
155 /// super-call. 155 /// super-call.
156 // TODO(johnniwinther): Improve semantic precision. 156 // TODO(johnniwinther): Improve semantic precision.
157 Iterable<ClassElement> get directlyInstantiatedClasses; 157 Iterable<ClassElement> get directlyInstantiatedClasses;
158 158
159 /// All types that are checked either through is, as or checked mode checks. 159 /// All types that are checked either through is, as or checked mode checks.
160 Iterable<ResolutionDartType> get isChecks; 160 Iterable<ResolutionDartType> get isChecks;
161 161
162 /// Registers that [type] is checked in this universe. The unaliased type is 162 /// Registers that [type] is checked in this world builder. The unaliased type
163 /// returned. 163 /// is returned.
164 ResolutionDartType registerIsCheck(ResolutionDartType type); 164 ResolutionDartType registerIsCheck(ResolutionDartType type);
165 165
166 /// All directly instantiated types, that is, the types of the directly 166 /// All directly instantiated types, that is, the types of the directly
167 /// instantiated classes. 167 /// instantiated classes.
168 // TODO(johnniwinther): Improve semantic precision. 168 // TODO(johnniwinther): Improve semantic precision.
169 Iterable<ResolutionDartType> get instantiatedTypes; 169 Iterable<ResolutionDartType> get instantiatedTypes;
170 } 170 }
171 171
172 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld { 172 abstract class ResolutionWorldBuilder implements WorldBuilder, OpenWorld {
173 /// Set of (live) local functions (closures) whose signatures reference type 173 /// Set of (live) local functions (closures) whose signatures reference type
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 // Use the [:seenClasses:] set to include non-instantiated 1062 // Use the [:seenClasses:] set to include non-instantiated
1063 // classes: if the superclass of these classes require RTI, then 1063 // classes: if the superclass of these classes require RTI, then
1064 // they also need RTI, so that a constructor passes the type 1064 // they also need RTI, so that a constructor passes the type
1065 // variables to the super constructor. 1065 // variables to the super constructor.
1066 forEachInstantiatedClass(addSubtypes); 1066 forEachInstantiatedClass(addSubtypes);
1067 1067
1068 _closed = true; 1068 _closed = true;
1069 return _closedWorldCache = new ClosedWorldImpl( 1069 return _closedWorldCache = new ClosedWorldImpl(
1070 backend: _backend, 1070 backend: _backend,
1071 commonElements: commonElements, 1071 commonElements: commonElements,
1072 resolverWorld: this, 1072 resolutionWorldBuilder: this,
1073 functionSetBuilder: _allFunctions, 1073 functionSetBuilder: _allFunctions,
1074 allTypedefs: _allTypedefs, 1074 allTypedefs: _allTypedefs,
1075 mixinUses: _mixinUses, 1075 mixinUses: _mixinUses,
1076 typesImplementedBySubclasses: typesImplementedBySubclasses, 1076 typesImplementedBySubclasses: typesImplementedBySubclasses,
1077 classHierarchyNodes: _classHierarchyNodes, 1077 classHierarchyNodes: _classHierarchyNodes,
1078 classSets: _classSets); 1078 classSets: _classSets);
1079 } 1079 }
1080 1080
1081 void registerMixinUse( 1081 void registerMixinUse(
1082 MixinApplicationElement mixinApplication, ClassElement mixin) { 1082 MixinApplicationElement mixinApplication, ClassElement mixin) {
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 @override 1967 @override
1968 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC; 1968 EnumSet<MemberUse> get _originalUse => MemberUses.ALL_STATIC;
1969 } 1969 }
1970 1970
1971 void removeFromSet(Map<String, Set<_MemberUsage>> map, Element element) { 1971 void removeFromSet(Map<String, Set<_MemberUsage>> map, Element element) {
1972 Set<_MemberUsage> set = map[element.name]; 1972 Set<_MemberUsage> set = map[element.name];
1973 if (set == null) return; 1973 if (set == null) return;
1974 set.removeAll( 1974 set.removeAll(
1975 set.where((_MemberUsage usage) => usage.entity == element).toList()); 1975 set.where((_MemberUsage usage) => usage.entity == element).toList());
1976 } 1976 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698