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

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

Issue 3009573002: Serialize exports scopes. (Closed)
Patch Set: Update status file for rasta/export.dart Created 3 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 162005275381264723e78ae382a7f3f7f62cf6e4..4857816b51f2cbf0c79567e1f78924164882def7 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
@@ -17,6 +17,7 @@ import '../builder/builder.dart'
ConstructorReferenceBuilder,
FormalParameterBuilder,
FunctionTypeBuilder,
+ InvalidTypeBuilder,
LibraryBuilder,
MemberBuilder,
MetadataBuilder,
@@ -96,6 +97,12 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
bool canAddImplementationBuilders = false;
+ /// Exports in addition to the members declared in this library.
+ ///
+ /// See [../dill/dill_library_builder.dart] for additional details on the
+ /// format used.
+ List<List<String>> additionalExports;
+
SourceLibraryBuilder(SourceLoader loader, Uri fileUri)
: this.fromScopes(loader, fileUri, new DeclarationBuilder<T>.library(),
new Scope.top());
@@ -512,6 +519,19 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
addToScope(name, member, -1, true);
});
}
+ exportScope.forEach((String name, Builder member) {
+ if (member.parent != this) {
+ additionalExports ??= <List<String>>[];
+ Builder parent = member.parent;
+ if (parent is LibraryBuilder) {
+ additionalExports.add(<String>["${parent.uri}", name]);
+ } else {
+ InvalidTypeBuilder invalidType = member;
+ String message = invalidType.message.message;
+ additionalExports.add(<String>[null, name, message]);
+ }
+ }
+ });
}
@override
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698