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

Unified Diff: pkg/analyzer/lib/src/task/model.dart

Issue 1136603002: Remove CompositeResultDescriptor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/model.dart
diff --git a/pkg/analyzer/lib/src/task/model.dart b/pkg/analyzer/lib/src/task/model.dart
index 23c44537dadb26b45a09d6ee8ef382b98eb05c5d..efdae7683140ae9a0df7afc59c132a2f1863272a 100644
--- a/pkg/analyzer/lib/src/task/model.dart
+++ b/pkg/analyzer/lib/src/task/model.dart
@@ -15,43 +15,18 @@ const ResultCachingPolicy DEFAULT_CACHING_POLICY =
const SimpleResultCachingPolicy(-1, -1);
/**
- * A concrete implementation of a [CompositeResultDescriptor].
- */
-class CompositeResultDescriptorImpl<V> extends ResultDescriptorImpl<V>
- implements CompositeResultDescriptor<V> {
- /**
- * The results that contribute to this result.
- */
- final List<ResultDescriptor<V>> contributors = <ResultDescriptor<V>>[];
-
- /**
- * Initialize a newly created composite result to have the given [name].
- */
- CompositeResultDescriptorImpl(String name) : super(name, null);
-
- /**
- * Record that the given analysis [result] contibutes to this result.
- */
- void recordContributor(ResultDescriptor<V> result) {
- contributors.add(result);
- }
-}
-
-/**
* A concrete implementation of a [ListResultDescriptor].
*/
class ListResultDescriptorImpl<E> extends ResultDescriptorImpl<List<E>>
implements ListResultDescriptor<E> {
/**
* Initialize a newly created analysis result to have the given [name] and
- * [defaultValue]. If a composite result is specified, then this result will
- * contribute to it.
+ * [defaultValue]. If a [cachingPolicy] is provided, it will control how long
+ * values associated with this result will remain in the cache.
*/
ListResultDescriptorImpl(String name, List<E> defaultValue,
- {CompositeResultDescriptor contributesTo,
- ResultCachingPolicy<List<E>> cachingPolicy: DEFAULT_CACHING_POLICY})
- : super(name, defaultValue,
- contributesTo: contributesTo, cachingPolicy: cachingPolicy);
+ {ResultCachingPolicy<List<E>> cachingPolicy: DEFAULT_CACHING_POLICY})
+ : super(name, defaultValue, cachingPolicy: cachingPolicy);
@override
ListTaskInput<E> of(AnalysisTarget target) =>
@@ -79,16 +54,11 @@ class ResultDescriptorImpl<V> implements ResultDescriptor<V> {
/**
* Initialize a newly created analysis result to have the given [name] and
- * [defaultValue]. If a composite result is specified, then this result will
- * contribute to it.
+ * [defaultValue]. If a [cachingPolicy] is provided, it will control how long
+ * values associated with this result will remain in the cache.
*/
ResultDescriptorImpl(this.name, this.defaultValue,
scheglov 2015/05/07 19:33:50 Can we make this a constant constructor now?
Brian Wilkerson 2015/05/07 20:00:30 I'm not sure it can remain a const constructor. We
- {CompositeResultDescriptor contributesTo,
- this.cachingPolicy: DEFAULT_CACHING_POLICY}) {
- if (contributesTo is CompositeResultDescriptorImpl) {
- contributesTo.recordContributor(this);
- }
- }
+ {this.cachingPolicy: DEFAULT_CACHING_POLICY});
@override
TaskInput<V> of(AnalysisTarget target) =>
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698