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

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

Issue 2235373003: Fix summary handling of unresolved imports, exports, and parts. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Simplify `allowMissingFiles` Created 4 years, 4 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
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 b4b8a756eeef1db4a09fcc3c0bd3ae79a795cecd..da8fcec03cc32cd827dbe223a38b59a3828a0837 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1492,6 +1492,11 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
static const String PARTS_UNIT_INPUT = 'PARTS_UNIT_INPUT';
/**
+ * The name of the input whose value is the modification time of the source.
+ */
+ static const String MODIFICATION_TIME_INPUT = 'MODIFICATION_TIME_INPUT';
+
+ /**
* The task descriptor describing this kind of task.
*/
static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
@@ -1527,6 +1532,7 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
CompilationUnit definingCompilationUnit =
getRequiredInput(DEFINING_UNIT_INPUT);
List<CompilationUnit> partUnits = getRequiredInput(PARTS_UNIT_INPUT);
+ int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT);
//
// Process inputs.
//
@@ -1647,6 +1653,7 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
if (libraryElement == null) {
libraryElement =
new LibraryElementImpl.forNode(owningContext, libraryNameNode);
+ libraryElement.synthetic = modificationTime < 0;
libraryElement.definingCompilationUnit = definingCompilationUnitElement;
libraryElement.entryPoint = entryPoint;
libraryElement.parts = sourcedCompilationUnits;
@@ -1745,7 +1752,8 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
RESOLVED_UNIT1.of(new LibrarySpecificUnit(source, source)),
PARTS_UNIT_INPUT: INCLUDED_PARTS.of(source).toList((Source unit) {
return RESOLVED_UNIT1.of(new LibrarySpecificUnit(source, unit));
- })
+ }),
+ MODIFICATION_TIME_INPUT: MODIFICATION_TIME.of(source)
};
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698