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

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

Issue 2335843003: Remove LibraryElement.isUpToDate(). (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 fffd3e23102706ad710c9a65be36c2a894a3aa50..45e0166de09be3aa2ac47803d13975bc236de7c8 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -5822,12 +5822,6 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
invalidate(this);
}
- @override
- bool isUpToDate(int timeStamp) {
- Set<LibraryElement> visitedLibraries = new Set();
- return _safeIsUpToDate(this, timeStamp, visitedLibraries);
- }
-
/**
* Set whether the library has the given [capability] to
* correspond to the given [value].
@@ -5885,44 +5879,6 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
return library is LibraryElementImpl &&
BooleanArray.get(library._resolutionCapabilities, capability.index);
}
-
- /**
- * Return `true` if the given [library] is up to date with respect to the
- * given [timeStamp]. The set of [visitedLibraries] is used to prevent
- * infinite recursion in the case of mutually dependent libraries.
- */
- static bool _safeIsUpToDate(LibraryElement library, int timeStamp,
- Set<LibraryElement> visitedLibraries) {
- if (!visitedLibraries.contains(library)) {
- visitedLibraries.add(library);
- AnalysisContext context = library.context;
- // Check the defining compilation unit.
- if (timeStamp <
- context
- .getModificationStamp(library.definingCompilationUnit.source)) {
- return false;
- }
- // Check the parted compilation units.
- for (CompilationUnitElement element in library.parts) {
- if (timeStamp < context.getModificationStamp(element.source)) {
- return false;
- }
- }
- // Check the imported libraries.
- for (LibraryElement importedLibrary in library.importedLibraries) {
- if (!_safeIsUpToDate(importedLibrary, timeStamp, visitedLibraries)) {
- return false;
- }
- }
- // Check the exported libraries.
- for (LibraryElement exportedLibrary in library.exportedLibraries) {
- if (!_safeIsUpToDate(exportedLibrary, timeStamp, visitedLibraries)) {
- return false;
- }
- }
- }
- return true;
- }
}
/**
« 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