| Index: pkg/analyzer/lib/src/task/dart.dart
|
| diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
|
| index 95f934eb7a1eea4036f7813a03300747edcff842..d21914cb85c2c5d52f7059e8a606fbcfba664308 100644
|
| --- a/pkg/analyzer/lib/src/task/dart.dart
|
| +++ b/pkg/analyzer/lib/src/task/dart.dart
|
| @@ -271,13 +271,6 @@ final ResultDescriptor<bool> CREATED_RESOLVED_UNIT9 =
|
| new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT9', false);
|
|
|
| /**
|
| - * The [Element]s defined in a [LibrarySpecificUnit].
|
| - */
|
| -final ListResultDescriptor<Element> DEFINED_ELEMENTS =
|
| - new ListResultDescriptor<Element>('DEFINED_ELEMENTS', null,
|
| - cachingPolicy: ELEMENT_CACHING_POLICY);
|
| -
|
| -/**
|
| * The sources representing the export closure of a library.
|
| * The [Source]s include only library sources, not their units.
|
| *
|
| @@ -2560,7 +2553,7 @@ class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
|
| 'GatherUsedLocalElementsTask',
|
| createTask,
|
| buildInputs,
|
| - <ResultDescriptor>[DEFINED_ELEMENTS, USED_LOCAL_ELEMENTS]);
|
| + <ResultDescriptor>[USED_LOCAL_ELEMENTS]);
|
|
|
| GatherUsedLocalElementsTask(
|
| InternalAnalysisContext context, AnalysisTarget target)
|
| @@ -2575,7 +2568,7 @@ class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
|
| CompilationUnitElement unitElement = unit.element;
|
| LibraryElement libraryElement = unitElement.library;
|
| //
|
| - // Prepare defined and used local elements.
|
| + // Prepare used local elements.
|
| //
|
| GatherUsedLocalElementsVisitor visitor =
|
| new GatherUsedLocalElementsVisitor(libraryElement);
|
| @@ -2583,7 +2576,6 @@ class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
|
| //
|
| // Record outputs.
|
| //
|
| - outputs[DEFINED_ELEMENTS] = visitor.definedElements;
|
| outputs[USED_LOCAL_ELEMENTS] = visitor.usedElements;
|
| }
|
|
|
| @@ -2617,11 +2609,6 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
|
| static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
|
|
|
| /**
|
| - * The name of a list of [DEFINED_ELEMENTS] for each library unit input.
|
| - */
|
| - static const String DEFINED_ELEMENTS_INPUT = 'DEFINED_ELEMENTS';
|
| -
|
| - /**
|
| * The name of a list of [USED_LOCAL_ELEMENTS] for each library unit input.
|
| */
|
| static const String USED_LOCAL_ELEMENTS_INPUT = 'USED_LOCAL_ELEMENTS';
|
| @@ -2667,8 +2654,6 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
|
| CompilationUnit unit = getRequiredInput(RESOLVED_UNIT_INPUT);
|
| List<UsedImportedElements> usedImportedElementsList =
|
| getRequiredInput(USED_IMPORTED_ELEMENTS_INPUT);
|
| - List<List<Element>> definedElementsList =
|
| - getRequiredInput(DEFINED_ELEMENTS_INPUT);
|
| List<UsedLocalElements> usedLocalElementsList =
|
| getRequiredInput(USED_LOCAL_ELEMENTS_INPUT);
|
| CompilationUnitElement unitElement = unit.element;
|
| @@ -2693,11 +2678,7 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
|
| new UsedLocalElements.merge(usedLocalElementsList);
|
| UnusedLocalElementsVerifier visitor =
|
| new UnusedLocalElementsVerifier(errorListener, usedElements);
|
| - for (List<Element> definedElements in definedElementsList) {
|
| - for (Element element in definedElements) {
|
| - element.accept(visitor);
|
| - }
|
| - }
|
| + unitElement.accept(visitor);
|
| }
|
| // Dart2js analysis.
|
| if (analysisOptions.dart2jsHint) {
|
| @@ -2729,8 +2710,6 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
|
| Source libSource = unit.library;
|
| return <String, TaskInput>{
|
| RESOLVED_UNIT_INPUT: RESOLVED_UNIT.of(unit),
|
| - DEFINED_ELEMENTS_INPUT:
|
| - LIBRARY_SPECIFIC_UNITS.of(libSource).toListOf(DEFINED_ELEMENTS),
|
| USED_LOCAL_ELEMENTS_INPUT:
|
| LIBRARY_SPECIFIC_UNITS.of(libSource).toListOf(USED_LOCAL_ELEMENTS),
|
| USED_IMPORTED_ELEMENTS_INPUT:
|
|
|