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..782be7ecf621b53908b3f2a2fdd2a624a8691a54 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; |
@@ -151,9 +153,9 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
void addExport(List<MetadataBuilder> metadata, String uri, |
Unhandled conditionalUris, List<Combinator> combinators, int charOffset) { |
- loader |
- .read(resolve(uri), charOffset, accessor: this) |
- .addExporter(this, combinators, charOffset); |
+ var exportedLibrary = loader.read(resolve(uri), charOffset, accessor: this); |
ahe
2017/08/08 09:47:58
Missing type.
scheglov
2017/08/08 16:31:16
It's not like it is worse typed now than it was. T
|
+ exportedLibrary.addExporter(this, combinators, charOffset); |
+ exports.add(new Export(this, exportedLibrary, combinators, charOffset)); |
ahe
2017/08/08 09:47:58
Question: you need access to the metadata as well,
scheglov
2017/08/08 16:31:16
Yes, we need metadata for everything about what th
|
} |
void addImport( |
@@ -337,7 +339,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 +500,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); |
}); |
} |