| Index: pkg/compiler/lib/src/deferred_load.dart
|
| diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
|
| index f5614d97e15d7437769ce86ec388851b04d1870f..78c0a37a05d5c7751b1355935c7dc62d2aafae28 100644
|
| --- a/pkg/compiler/lib/src/deferred_load.dart
|
| +++ b/pkg/compiler/lib/src/deferred_load.dart
|
| @@ -28,7 +28,6 @@ import 'elements/elements.dart' show
|
| FunctionElement,
|
| ImportElement,
|
| LibraryElement,
|
| - LocalFunctionElement,
|
| MetadataAnnotation,
|
| PrefixElement,
|
| ScopeContainerElement,
|
| @@ -49,14 +48,11 @@ import 'tree/tree.dart' show
|
| NewExpression,
|
| Node;
|
| import 'universe/use.dart' show
|
| - DynamicUse,
|
| StaticUse,
|
| TypeUse,
|
| TypeUseKind;
|
| import 'universe/world_impact.dart' show
|
| - ImpactUseCase,
|
| - WorldImpact,
|
| - WorldImpactVisitorImpl;
|
| + WorldImpact;
|
| import 'util/setlet.dart' show
|
| Setlet;
|
| import 'util/uri_extras.dart' as uri_extras;
|
| @@ -126,8 +122,6 @@ class DeferredLoadTask extends CompilerTask {
|
| /// Will be `true` if the program contains deferred libraries.
|
| bool isProgramSplit = false;
|
|
|
| - static const ImpactUseCase IMPACT_USE = const ImpactUseCase('Deferred load');
|
| -
|
| /// A mapping from the name of a defer import to all the output units it
|
| /// depends on in a list of lists to be loaded in the order they appear.
|
| ///
|
| @@ -324,35 +318,30 @@ class DeferredLoadTask extends CompilerTask {
|
|
|
| WorldImpact worldImpact =
|
| compiler.resolution.getWorldImpact(analyzableElement);
|
| - compiler.impactStrategy.visitImpact(
|
| - analyzableElement,
|
| - worldImpact,
|
| - new WorldImpactVisitorImpl(
|
| - visitStaticUse: (StaticUse staticUse) {
|
| - elements.add(staticUse.element);
|
| - },
|
| - visitTypeUse: (TypeUse typeUse) {
|
| - DartType type = typeUse.type;
|
| - switch (typeUse.kind) {
|
| - case TypeUseKind.TYPE_LITERAL:
|
| - if (type.isTypedef || type.isInterfaceType) {
|
| - elements.add(type.element);
|
| - }
|
| - break;
|
| - case TypeUseKind.INSTANTIATION:
|
| - case TypeUseKind.IS_CHECK:
|
| - case TypeUseKind.AS_CAST:
|
| - case TypeUseKind.CATCH_TYPE:
|
| - collectTypeDependencies(type);
|
| - break;
|
| - case TypeUseKind.CHECKED_MODE_CHECK:
|
| - if (compiler.enableTypeAssertions) {
|
| - collectTypeDependencies(type);
|
| - }
|
| - break;
|
| - }
|
| - }),
|
| - IMPACT_USE);
|
| + worldImpact.staticUses.forEach((StaticUse staticUse) {
|
| + elements.add(staticUse.element);
|
| + });
|
| + for (TypeUse typeUse in worldImpact.typeUses) {
|
| + DartType type = typeUse.type;
|
| + switch (typeUse.kind) {
|
| + case TypeUseKind.TYPE_LITERAL:
|
| + if (type.isTypedef || type.isInterfaceType) {
|
| + elements.add(type.element);
|
| + }
|
| + break;
|
| + case TypeUseKind.INSTANTIATION:
|
| + case TypeUseKind.IS_CHECK:
|
| + case TypeUseKind.AS_CAST:
|
| + case TypeUseKind.CATCH_TYPE:
|
| + collectTypeDependencies(type);
|
| + break;
|
| + case TypeUseKind.CHECKED_MODE_CHECK:
|
| + if (compiler.enableTypeAssertions) {
|
| + collectTypeDependencies(type);
|
| + }
|
| + break;
|
| + }
|
| + }
|
|
|
| TreeElements treeElements = analyzableElement.resolvedAst.elements;
|
| assert(treeElements != null);
|
|
|