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

Unified Diff: pkg/analyzer/lib/src/dart/element/builder.dart

Issue 1899303003: Use single map of Source to modification time. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/doc/tasks.html ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/builder.dart
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index b29f671dd0bc5457812d93e67535fc96e8591a6c..08de907a9c3e890079a93bd9c8025f5741aba952 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -74,9 +74,9 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> {
final LibraryElementImpl libraryElement;
/**
- * Map from sources imported by this library to their modification times.
+ * Map from sources referenced by this library to their modification times.
*/
- final Map<Source, int> importModificationTimeMap;
+ final Map<Source, int> sourceModificationTimeMap;
/**
* Map from sources imported by this library to their corresponding library
@@ -91,11 +91,6 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> {
final Map<Source, SourceKind> importSourceKindMap;
/**
- * Map from sources exported by this library to their modification times.
- */
- final Map<Source, int> exportModificationTimeMap;
-
- /**
* Map from sources exported by this library to their corresponding library
* elements.
*/
@@ -136,10 +131,9 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> {
DirectiveElementBuilder(
this.context,
this.libraryElement,
- this.importModificationTimeMap,
+ this.sourceModificationTimeMap,
this.importLibraryMap,
this.importSourceKindMap,
- this.exportModificationTimeMap,
this.exportLibraryMap,
this.exportSourceKindMap);
@@ -175,7 +169,7 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> {
// Remove previous element. (It will remain null if the target is missing.)
node.element = null;
Source exportedSource = node.source;
- int exportedTime = exportModificationTimeMap[exportedSource] ?? -1;
+ int exportedTime = sourceModificationTimeMap[exportedSource] ?? -1;
if (exportedTime != -1) {
// The exported source will be null if the URI in the export
// directive was invalid.
@@ -218,7 +212,7 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> {
// Remove previous element. (It will remain null if the target is missing.)
node.element = null;
Source importedSource = node.source;
- int importedTime = importModificationTimeMap[importedSource] ?? -1;
+ int importedTime = sourceModificationTimeMap[importedSource] ?? -1;
if (importedTime != -1) {
// The imported source will be null if the URI in the import
// directive was invalid.
« no previous file with comments | « pkg/analyzer/doc/tasks.html ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698