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

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

Issue 2809523002: Issue 29288. Resynthesize Import/Export/PartElement for every directive. (Closed)
Patch Set: Created 3 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
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 57c8d14c73e748b8e4db5e39c3c79988ff08caa3..fb7779f3cc02cf192e6cc77ab4c71b8f57c9a71a 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -5880,16 +5880,11 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
for (int i = 0; i < length; i++) {
UnlinkedExportPublic serializedExportPublic =
unlinkedPublicExports[i];
- LibraryElement exportedLibrary = resynthesizerContext
- .buildExportedLibrary(serializedExportPublic.uri);
- if (exportedLibrary != null) {
- UnlinkedExportNonPublic serializedExportNonPublic =
- unlinkedNonPublicExports[i];
- ExportElementImpl exportElement =
- new ExportElementImpl.forSerialized(
- serializedExportPublic, serializedExportNonPublic, library);
- exports.add(exportElement);
- }
+ UnlinkedExportNonPublic serializedExportNonPublic =
+ unlinkedNonPublicExports[i];
+ ExportElementImpl exportElement = new ExportElementImpl.forSerialized(
+ serializedExportPublic, serializedExportNonPublic, library);
+ exports.add(exportElement);
}
_exports = exports;
} else {
@@ -5970,14 +5965,9 @@ class LibraryElementImpl extends ElementImpl implements LibraryElement {
LinkedLibrary linkedLibrary = resynthesizerContext.linkedLibrary;
for (int i = 0; i < length; i++) {
int dependency = linkedLibrary.importDependencies[i];
- LibraryElement importedLibrary =
- resynthesizerContext.buildImportedLibrary(dependency);
- if (importedLibrary != null) {
- ImportElementImpl importElement =
- new ImportElementImpl.forSerialized(
- unlinkedImports[i], dependency, library);
- imports.add(importElement);
- }
+ ImportElementImpl importElement = new ImportElementImpl.forSerialized(
+ unlinkedImports[i], dependency, library);
+ imports.add(importElement);
}
_imports = imports;
} else {

Powered by Google App Engine
This is Rietveld 408576698