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

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

Issue 1129033003: When a target is removed, invalidate all dependent results. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 5a96e0141d73e9d76e8218f9698c718a8e1f6c72..7778d03f00e6503b0039afb6a27151573fdd14c8 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1632,35 +1632,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
/**
- * In response to a change to at least one of the compilation units in the
- * library defined by the given [librarySource], invalidate any results that
- * are dependent on the result of resolving that library.
- *
- * <b>Note:</b> Any cache entries that were accessed before this method was
- * invoked must be re-accessed after this method returns.
- */
- void _invalidateLibraryResolution(Source librarySource) {
- // TODO(brianwilkerson) Figure out whether we still need this.
- // TODO(brianwilkerson) This could be optimized. There's no need to flush
- // all of these entries if the public namespace hasn't changed, which will
- // be a fairly common case. The question is whether we can afford the time
- // to compute the namespace to look for differences.
-// DartEntry libraryEntry = _getReadableDartEntry(librarySource);
-// if (libraryEntry != null) {
-// List<Source> includedParts =
-// libraryEntry.getValue(DartEntry.INCLUDED_PARTS);
-// libraryEntry.invalidateAllResolutionInformation(false);
-// _workManager.add(librarySource, SourcePriority.LIBRARY);
-// for (Source partSource in includedParts) {
-// SourceEntry partEntry = _cache.get(partSource);
-// if (partEntry is DartEntry) {
-// partEntry.invalidateAllResolutionInformation(false);
-// }
-// }
-// }
- }
-
- /**
* Log the given debugging [message].
*/
void _logInformation(String message) {
@@ -1812,20 +1783,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
* Record that the given [source] has been removed.
*/
void _sourceRemoved(Source source) {
- List<Source> containingLibraries = getLibrariesContaining(source);
- if (containingLibraries != null && containingLibraries.isNotEmpty) {
- HashSet<Source> libraries = new HashSet<Source>();
- for (Source librarySource in containingLibraries) {
- libraries.add(librarySource);
- for (Source dependentLibrary
- in getLibrariesDependingOn(librarySource)) {
- libraries.add(dependentLibrary);
- }
- }
- for (Source librarySource in libraries) {
- _invalidateLibraryResolution(librarySource);
- }
- }
_cache.remove(source);
_removeFromPriorityOrder(source);
}
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698