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

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

Issue 2757753002: Migrate DDC to the new analysis driver.
Patch Set: Created 3 years, 9 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
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);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698