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

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

Issue 1150273003: Use Set instead of List for 'dependentResults'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/cache.dart
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index 35ed5568642616ce04a626ff9c0a09001b13b611..ce0bf990244d4f386e2d98a65123220aeed6d2cd 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -467,8 +467,8 @@ class CacheEntry {
}
});
// Invalidate results that depend on this result.
- List<TargetedResult> dependentResults = thisData.dependentResults;
- thisData.dependentResults = <TargetedResult>[];
+ Set<TargetedResult> dependentResults = thisData.dependentResults;
+ thisData.dependentResults = new Set<TargetedResult>();
dependentResults.forEach((TargetedResult dependentResult) {
CacheEntry entry = _partition.get(dependentResult.target);
if (entry != null) {
@@ -935,7 +935,7 @@ class ResultData {
/**
* A list of the results that depend on this result.
*/
- List<TargetedResult> dependentResults = <TargetedResult>[];
+ Set<TargetedResult> dependentResults = new Set<TargetedResult>();
/**
* Initialize a newly created result holder to represent the value of data
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698