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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2336913002: Remove LibraryElement.visibleLibraries. (Closed)
Patch Set: Created 4 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 | « pkg/analyzer/lib/dart/element/element.dart ('k') | pkg/analyzer/lib/src/dart/element/handle.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 95fbec9dfc7aaadc80f2eb1bb5686fc616f23063..00cad13b1437194e898fb2a819aceabcb7898801 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -5700,13 +5700,6 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
}
@override
- List<LibraryElement> get visibleLibraries {
- HashSet<LibraryElement> visibleLibraries = new HashSet<LibraryElement>();
- _addVisibleLibraries(visibleLibraries, false);
- return visibleLibraries.toList(growable: false);
- }
-
- @override
accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
/**
@@ -5842,36 +5835,6 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
}
/**
- * Recursively fills set of visible libraries for
- * [getVisibleElementsLibraries].
- */
- void _addVisibleLibraries(
- Set<LibraryElement> visibleLibraries, bool includeExports) {
- // maybe already processed
- if (!visibleLibraries.add(this)) {
- return;
- }
- // add imported libraries
- for (ImportElement importElement in imports) {
- LibraryElement importedLibrary = importElement.importedLibrary;
- if (importedLibrary != null) {
- (importedLibrary as LibraryElementImpl)
- ._addVisibleLibraries(visibleLibraries, true);
- }
- }
- // add exported libraries
- if (includeExports) {
- for (ExportElement exportElement in exports) {
- LibraryElement exportedLibrary = exportElement.exportedLibrary;
- if (exportedLibrary != null) {
- (exportedLibrary as LibraryElementImpl)
- ._addVisibleLibraries(visibleLibraries, true);
- }
- }
- }
- }
-
- /**
* Return `true` if the [library] has the given [capability].
*/
static bool hasResolutionCapability(
« no previous file with comments | « pkg/analyzer/lib/dart/element/element.dart ('k') | pkg/analyzer/lib/src/dart/element/handle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698