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

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

Issue 1420113004: Backout earlier change to task model (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | pkg/analyzer/tool/task_dependency_graph/tasks.dot » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index c12df3716cf8945f0eb1364b14beae901e780093..25fc0e5791b2778e05aa106d498c637b87590016 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1612,13 +1612,14 @@ class ComputeConstantDependenciesTask extends ConstantEvaluationAnalysisTask {
*/
static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
//
- // We need to force the computation of the RESOLVED_UNIT9 for each unit
- // reachable from the target's library so that all of the AST's for the
- // constructor initializers that we might encounter have been copied into
- // the element model.
- //
- // TODO(brianwilkerson) This could be improved by computing a more accurate
- // list of the sources containing constructors that are actually referenced.
+ // TODO(brianwilkerson) I believe that this does not properly guarantee that
+ // all of the constructor initializers that we might encounter have been
+ // copied into the element model. We tried forcing the computation of the
+ // RESOLVED_UNIT9 for each unit reachable from the target's library, but
+ // that had too big a performance impact. We could potentially mitigate the
+ // impact by computing a more accurate list of the sources containing
+ // constructors that are actually referenced, but other approaches should
+ // be considered.
//
Source librarySource;
if (target is Element) {
@@ -1632,10 +1633,8 @@ class ComputeConstantDependenciesTask extends ConstantEvaluationAnalysisTask {
'Cannot build inputs for a ${target.runtimeType}');
}
return <String, TaskInput>{
- 'resolvedUnits': IMPORT_EXPORT_SOURCE_CLOSURE
- .of(librarySource)
- .toFlattenListOf(LIBRARY_SPECIFIC_UNITS)
- .toListOf(RESOLVED_UNIT9),
+ 'resolvedUnit': RESOLVED_UNIT9
+ .of(new LibrarySpecificUnit(librarySource, target.source)),
TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
};
}
« no previous file with comments | « no previous file | pkg/analyzer/tool/task_dependency_graph/tasks.dot » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698