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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2516003003: Compute and flush sets of transitively referenced files in File[System]State. (Closed)
Patch Set: Created 4 years, 1 month 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/lib/src/dart/analysis/file_state.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 543e3828d86e6b3876ee63256c3e6101796bb46d..7486496bc19c246b785ccd56d3ed82c5b6c2035f 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -1139,7 +1139,6 @@ class _LibraryNode {
final FileState file;
final Uri uri;
- Set<FileState> transitiveDependencies;
String _dependencySignature;
_LibraryNode(this.driver, this.file, this.uri);
@@ -1152,8 +1151,7 @@ class _LibraryNode {
signature.addString(driver._sdkBundle.apiSignature);
// Add all unlinked API signatures.
- computeTransitiveDependencies();
- transitiveDependencies
+ file.transitiveFiles
.map((file) => file.apiSignature)
.forEach(signature.addBytes);
@@ -1170,20 +1168,6 @@ class _LibraryNode {
return other is _LibraryNode && other.uri == uri;
}
- void computeTransitiveDependencies() {
- if (transitiveDependencies == null) {
- transitiveDependencies = new Set<FileState>();
-
- void appendDependencies(FileState file) {
- if (transitiveDependencies.add(file)) {
- file.dependencies.forEach(appendDependencies);
- }
- }
-
- appendDependencies(file);
- }
- }
-
@override
String toString() => uri.toString();
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/analysis/file_state.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698