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

Unified Diff: pkg/compiler/lib/src/universe/resolution_world_builder.dart

Issue 3012733002: Revert "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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/corelib_2/corelib_2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/universe/resolution_world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index 2d50d62f881055d87aa63b6da8d935180cbec0e1..a2b023590561949a2a8f0be4a6b67f45f9ccd1cf 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -319,8 +319,6 @@ abstract class ResolutionWorldBuilderBase
final Set<FieldEntity> fieldSetters = new Set<FieldEntity>();
final Set<DartType> isChecks = new Set<DartType>();
- _ClassEnsurer _classEnsurer;
-
/// Set of all closures in the program. Used by the mirror tracking system
/// to find all live closure instances.
final Set<Local> localFunctions = new Set<Local>();
@@ -394,9 +392,7 @@ abstract class ResolutionWorldBuilderBase
this._backendUsageBuilder,
this._rtiNeedBuilder,
this._nativeResolutionEnqueuer,
- this.selectorConstraintsStrategy) {
- _classEnsurer = new _ClassEnsurer(this);
- }
+ this.selectorConstraintsStrategy);
Iterable<ClassEntity> get processedClasses => _processedClasses.keys
.where((cls) => _processedClasses[cls].isInstantiated);
@@ -948,22 +944,6 @@ abstract class ResolutionWorldBuilderBase
// variables to the super constructor.
forEachInstantiatedClass(addSubtypes);
- instantiatedTypes.forEach((type) {
- var callType = _dartTypes.getCallType(type);
- if (callType != null) {
- _classEnsurer.ensureClassesInType(callType);
- }
- });
- localFunctions.forEach((function) {
- _classEnsurer.ensureClassesInType(
- _elementEnvironment.getLocalFunctionType(function));
- });
- isChecks.forEach(_classEnsurer.ensureClassesInType);
- closurizedMembers.forEach((function) {
- _classEnsurer
- .ensureClassesInType(_elementEnvironment.getFunctionType(function));
- });
-
_classHierarchyNodes.keys.toList().forEach(_ensureClassSet);
return typesImplementedBySubclasses;
@@ -1050,39 +1030,3 @@ abstract class KernelResolutionWorldBuilderBase
throw new UnimplementedError('KernelResolutionWorldBuilder.registerClass');
}
}
-
-// TODO(het): Make this have a type of BaseDartTypeVisitor<void, Null>
-class _ClassEnsurer extends BaseDartTypeVisitor<dynamic, Null> {
- final ResolutionWorldBuilderBase worldBuilder;
-
- _ClassEnsurer(this.worldBuilder);
-
- void ensureClassesInType(DartType type) {
- type.accept(this, null);
- }
-
- @override
- visitType(DartType type, _) {}
-
- @override
- visitFunctionType(FunctionType type, _) {
- type.returnType.accept(this, null);
- type.parameterTypes.forEach((t) {
- t.accept(this, null);
- });
- type.optionalParameterTypes.forEach((t) {
- t.accept(this, null);
- });
- type.namedParameterTypes.forEach((t) {
- t.accept(this, null);
- });
- }
-
- @override
- visitInterfaceType(InterfaceType type, _) {
- worldBuilder._ensureClassSet(type.element);
- type.typeArguments.forEach((t) {
- t.accept(this, null);
- });
- }
-}
« no previous file with comments | « no previous file | tests/corelib_2/corelib_2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698