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

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

Issue 3008763002: Store actual Reference(s) for additional exports. (Closed)
Patch Set: Fixes for review comments. 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
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 cfbb348487164abadefee701b5bcd32338adfc03..c6146ecd9edb006f5c439dcd7886348bbb8b7cc2 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
@@ -4,7 +4,7 @@
library fasta.source_library_builder;
-import 'package:kernel/ast.dart' show ProcedureKind;
+import 'package:kernel/ast.dart' show ProcedureKind, Reference;
import '../../base/resolve_relative_uri.dart' show resolveRelativeUri;
@@ -17,7 +17,6 @@ import '../builder/builder.dart'
ConstructorReferenceBuilder,
FormalParameterBuilder,
FunctionTypeBuilder,
- InvalidTypeBuilder,
LibraryBuilder,
MemberBuilder,
MetadataBuilder,
@@ -54,8 +53,6 @@ import '../import.dart' show Import;
import '../problems.dart' show unhandled;
-import '../util/relativize.dart' show relativizeUri;
-
import 'source_loader.dart' show SourceLoader;
abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
@@ -99,11 +96,10 @@ 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;
+ /// References to nodes exported by `export` declarations that:
+ /// - aren't ambiguous, or
+ /// - aren't hidden by local declarations.
+ List<Reference> additionalExports;
SourceLibraryBuilder(SourceLoader loader, Uri fileUri)
: this.fromScopes(loader, fileUri, new DeclarationBuilder<T>.library(),
@@ -524,17 +520,10 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
}
exportScope.forEach((String name, Builder member) {
if (member.parent != this) {
- additionalExports ??= <List<String>>[];
+ additionalExports ??= <Reference>[];
Builder parent = member.parent;
if (parent is LibraryBuilder) {
- additionalExports.add(<String>[
- relativizeUri(parent.uri, base: uri.resolve(".")),
- name
- ]);
- } else {
- InvalidTypeBuilder invalidType = member;
- String message = invalidType.message.message;
- additionalExports.add(<String>[null, name, message]);
+ additionalExports.add(member.target.reference);
}
}
});
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart ('k') | pkg/front_end/test/fasta/ambiguous_export_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698