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); |
} |
} |
}); |