| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.src.task.dart; | 5 library analyzer.src.task.dart; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2757 // Generate errors. | 2757 // Generate errors. |
| 2758 // | 2758 // |
| 2759 unit.accept(new DeadCodeVerifier(errorReporter, typeSystem: typeSystem)); | 2759 unit.accept(new DeadCodeVerifier(errorReporter, typeSystem: typeSystem)); |
| 2760 // Verify imports. | 2760 // Verify imports. |
| 2761 { | 2761 { |
| 2762 ImportsVerifier verifier = new ImportsVerifier(); | 2762 ImportsVerifier verifier = new ImportsVerifier(); |
| 2763 verifier.addImports(unit); | 2763 verifier.addImports(unit); |
| 2764 usedImportedElementsList.forEach(verifier.removeUsedElements); | 2764 usedImportedElementsList.forEach(verifier.removeUsedElements); |
| 2765 verifier.generateDuplicateImportHints(errorReporter); | 2765 verifier.generateDuplicateImportHints(errorReporter); |
| 2766 verifier.generateUnusedImportHints(errorReporter); | 2766 verifier.generateUnusedImportHints(errorReporter); |
| 2767 verifier.generateUnusedShownNameHints(errorReporter); |
| 2767 } | 2768 } |
| 2768 // Unused local elements. | 2769 // Unused local elements. |
| 2769 { | 2770 { |
| 2770 UsedLocalElements usedElements = | 2771 UsedLocalElements usedElements = |
| 2771 new UsedLocalElements.merge(usedLocalElementsList); | 2772 new UsedLocalElements.merge(usedLocalElementsList); |
| 2772 UnusedLocalElementsVerifier visitor = | 2773 UnusedLocalElementsVerifier visitor = |
| 2773 new UnusedLocalElementsVerifier(errorListener, usedElements); | 2774 new UnusedLocalElementsVerifier(errorListener, usedElements); |
| 2774 unitElement.accept(visitor); | 2775 unitElement.accept(visitor); |
| 2775 } | 2776 } |
| 2776 // Dart2js analysis. | 2777 // Dart2js analysis. |
| (...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5489 | 5490 |
| 5490 @override | 5491 @override |
| 5491 bool moveNext() { | 5492 bool moveNext() { |
| 5492 if (_newSources.isEmpty) { | 5493 if (_newSources.isEmpty) { |
| 5493 return false; | 5494 return false; |
| 5494 } | 5495 } |
| 5495 currentTarget = _newSources.removeLast(); | 5496 currentTarget = _newSources.removeLast(); |
| 5496 return true; | 5497 return true; |
| 5497 } | 5498 } |
| 5498 } | 5499 } |
| OLD | NEW |