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

Unified Diff: pkg/compiler/lib/src/resolution/registry.dart

Issue 1416253002: Remove requiredTypes (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/registry.dart
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 5e6105e4b5de402a13b408f68fb481225acf3fa1..4894e682f43f1d4bbbe9ffd83a0650db710bd07e 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -90,28 +90,12 @@ class EagerRegistry extends Registry {
class _ResolutionWorldImpact extends ResolutionImpact with WorldImpactBuilder {
final String name;
Setlet<Feature> _features;
- // TODO(johnniwinther): This seems to be a union of other sets.
- Setlet<DartType> _requiredTypes;
Setlet<MapLiteralUse> _mapLiterals;
Setlet<ListLiteralUse> _listLiterals;
Setlet<String> _constSymbolNames;
_ResolutionWorldImpact(this.name);
- void registerRequiredType(DartType type) {
- assert(type != null);
- if (_requiredTypes == null) {
- _requiredTypes = new Setlet<DartType>();
- }
- _requiredTypes.add(type);
- }
-
- @override
- Iterable<DartType> get requiredTypes {
- return _requiredTypes != null
- ? _requiredTypes : const <DartType>[];
- }
-
void registerMapLiteral(MapLiteralUse mapLiteralUse) {
assert(mapLiteralUse != null);
if (_mapLiterals == null) {
@@ -369,14 +353,6 @@ class ResolutionRegistry extends Registry {
registerStaticUse(superConstructor);
}
- // TODO(johnniwinther): Remove this.
- // Use [registerInstantiatedType] of `rawType` instead.
- @deprecated
- void registerInstantiatedClass(ClassElement element) {
- element.ensureResolved(compiler.resolution);
- registerInstantiatedType(element.rawType);
- }
-
void registerLazyField() {
worldImpact.registerFeature(Feature.LAZY_FIELD);
}
@@ -404,19 +380,21 @@ class ResolutionRegistry extends Registry {
/// Register a checked mode check against [type].
void registerCheckedModeCheck(DartType type) {
worldImpact.registerCheckedModeCheckedType(type);
- mapping.addRequiredType(type);
+ }
+
+ /// Register an on-catch clause of [type].
+ void registerOnCatchType(DartType type) {
+ worldImpact.registerOnCatchType(type);
}
/// Register an is-test or is-not-test of [type].
void registerIsCheck(DartType type) {
worldImpact.registerIsCheck(type);
- mapping.addRequiredType(type);
}
/// Register an as-cast of [type].
void registerAsCast(DartType type) {
worldImpact.registerAsCast(type);
- mapping.addRequiredType(type);
}
void registerClosure(LocalFunctionElement element) {
@@ -491,18 +469,12 @@ class ResolutionRegistry extends Registry {
void registerInstantiatedType(InterfaceType type) {
worldImpact.registerInstantiatedType(type);
- mapping.addRequiredType(type);
}
void registerAbstractClassInstantiation() {
worldImpact.registerFeature(Feature.ABSTRACT_CLASS_INSTANTIATION);
}
- void registerRequiredType(DartType type, Element enclosingElement) {
- worldImpact.registerRequiredType(type);
- mapping.addRequiredType(type);
- }
-
void registerStringInterpolation() {
worldImpact.registerFeature(Feature.STRING_INTERPOLATION);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698