Index: pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
index bf9361d635a98998ae98d5043308a59502c61d3e..a8711e6231881ef35d5f8ee0d502399c7c0eb8b3 100644 |
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart |
@@ -412,7 +412,6 @@ class SummaryDataStore { |
* the given [unitUriString], or `null` if no such library is in the store. |
*/ |
List<String> getContainingLibraryUris(String unitUriString) { |
- |
// The unit is the defining unit of a library. |
if (linkedMap.containsKey(unitUriString)) { |
return <String>[unitUriString]; |
@@ -433,6 +432,14 @@ class SummaryDataStore { |
return libraryUriStrings.isNotEmpty ? libraryUriStrings : null; |
} |
+ /** |
+ * Return `true` if the store contains the unlinked summary for the unit |
+ * with the given absolute [uri]. |
+ */ |
+ bool hasUnlinkedUnit(String uri) { |
+ return unlinkedMap.containsKey(uri); |
+ } |
+ |
void _fillMaps(String path, ResourceProvider resourceProvider) { |
List<int> buffer; |
if (resourceProvider != null) { |
@@ -445,4 +452,12 @@ class SummaryDataStore { |
PackageBundle bundle = new PackageBundle.fromBuffer(buffer); |
addBundle(path, bundle); |
} |
+ |
+ /** |
+ * TODO(scheglov) document |
+ */ |
+ void addStore(SummaryDataStore other) { |
+ unlinkedMap.addAll(other.unlinkedMap); |
+ linkedMap.addAll(other.linkedMap); |
+ } |
} |