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

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

Issue 1212503004: Tighten up dependencies in the task model. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/test/src/task/dart_test.dart » ('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 a16f33774d21efa9ae5d85508eea9c4be751e2b3..ae25ec87c57529217304a8394168e480c60436d1 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -3093,12 +3093,9 @@ class ResolveLibraryTypeNamesTask extends SourceBasedAnalysisTask {
static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
Source source = target;
return <String, TaskInput>{
- LIBRARY_INPUT: LIBRARY_ELEMENT4.of(source),
- 'resolvedUnits': IMPORT_EXPORT_SOURCE_CLOSURE
- .of(source)
- .toMapOf(UNITS)
- .toFlattenList((Source library, Source unit) =>
- RESOLVED_UNIT3.of(new LibrarySpecificUnit(library, unit))),
+ 'resolvedUnit': UNITS.of(source).toList((Source unit) =>
+ RESOLVED_UNIT3.of(new LibrarySpecificUnit(source, unit))),
+ LIBRARY_INPUT: LIBRARY_ELEMENT4.of(source)
};
}
@@ -3182,6 +3179,9 @@ class ResolveUnitReferencesTask extends SourceBasedAnalysisTask {
static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
LibrarySpecificUnit unit = target;
return <String, TaskInput>{
+ 'fullyBuiltLibraryElements': IMPORT_EXPORT_SOURCE_CLOSURE
+ .of(unit.library)
+ .toListOf(LIBRARY_ELEMENT6),
LIBRARY_INPUT: LIBRARY_ELEMENT6.of(unit.library),
UNIT_INPUT: RESOLVED_UNIT4.of(unit),
TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
@@ -3349,11 +3349,8 @@ class ResolveVariableReferencesTask extends SourceBasedAnalysisTask {
static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
LibrarySpecificUnit unit = target;
return <String, TaskInput>{
- 'fullyBuiltLibraryElements': IMPORT_EXPORT_SOURCE_CLOSURE
- .of(unit.library)
- .toListOf(LIBRARY_ELEMENT6),
- LIBRARY_INPUT: LIBRARY_ELEMENT6.of(unit.library),
- UNIT_INPUT: RESOLVED_UNIT3.of(unit),
+ LIBRARY_INPUT: LIBRARY_ELEMENT1.of(unit.library),
+ UNIT_INPUT: RESOLVED_UNIT1.of(unit),
TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
};
}
@@ -3405,7 +3402,8 @@ class ScanDartTask extends SourceBasedAnalysisTask {
if (context.getModificationStamp(target.source) < 0) {
String message = 'Content could not be read';
if (context is InternalAnalysisContext) {
- CacheEntry entry = (context as InternalAnalysisContext).getCacheEntry(target);
+ CacheEntry entry =
+ (context as InternalAnalysisContext).getCacheEntry(target);
CaughtException exception = entry.exception;
if (exception != null) {
message = exception.toString();
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698