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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Issue 2991753002: Add export dependencies to Kernel libraries and use them to resynthesize ExportElement(s) in Analyz… (Closed)
Patch Set: Created 3 years, 5 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/front_end/lib/src/fasta/source/source_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 119684a9c53d427dd48a7a65a4c93360d6a3d791..207866f015ea3ed20772027ce1041403b57b6f0c 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -68,6 +68,8 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
final List<Import> imports = <Import>[];
+ final List<Export> exports = <Export>[];
+
final Scope importScope;
final Uri fileUri;
@@ -154,6 +156,11 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
loader
.read(resolve(uri), charOffset, accessor: this)
.addExporter(this, combinators, charOffset);
+ exports.add(new Export(
+ this,
+ loader.read(resolve(uri), charOffset, accessor: this),
Siggi Cherem (dart-lang) 2017/07/26 19:22:42 rather than rereading it here, store it in a local
scheglov 2017/07/26 19:33:04 Done.
+ combinators,
+ charOffset));
}
void addImport(
@@ -337,7 +344,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
fileUri);
}
return existing
- ..exports.merge(builder.exports,
+ ..exportScope.merge(builder.exportScope,
(String name, Builder existing, Builder member) {
return buildAmbiguousBuilder(name, existing, member, charOffset);
});
@@ -498,7 +505,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
import.finalizeImports(this);
}
if (!explicitCoreImport) {
- loader.coreLibrary.exports.forEach((String name, Builder member) {
+ loader.coreLibrary.exportScope.forEach((String name, Builder member) {
addToScope(name, member, -1, true);
});
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart ('k') | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698