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

Unified Diff: pkg/analyzer/lib/src/summary/incremental_cache.dart

Issue 2044513003: Serve INCLUDED_PARTS from incremental cache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | pkg/analyzer/test/src/summary/incremental_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/summary/incremental_cache.dart
diff --git a/pkg/analyzer/lib/src/summary/incremental_cache.dart b/pkg/analyzer/lib/src/summary/incremental_cache.dart
index 38f32034b085d545b57e6add288524d9b04d877c..34cbd85faa721bed423e91525e8d8bcea93d19de 100644
--- a/pkg/analyzer/lib/src/summary/incremental_cache.dart
+++ b/pkg/analyzer/lib/src/summary/incremental_cache.dart
@@ -160,6 +160,26 @@ class IncrementalCache {
}
/**
+ * Return the parts of the given [librarySource], or `null` if unknown.
+ */
+ List<Source> getLibraryParts(Source librarySource) {
+ try {
+ CacheSourceContent contentSource = _getCacheSourceContent(librarySource);
+ if (contentSource != null) {
+ return contentSource.partUris.map((String partUri) {
+ Source partSource = _resolveUri(librarySource, partUri);
+ if (partSource == null) {
+ throw new StateError(
+ 'Unable to resolve $partUri in $librarySource');
+ }
+ return partSource;
+ }).toList();
+ }
+ } catch (e) {}
+ return null;
+ }
+
+ /**
* Return cached errors in the given [source] in the context of the given
* [librarySource], or `null` if the cache does not have this information.
*/
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/incremental_cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698