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 dded425538906b3580c8300b90a5cd0dd6dc5e95..cfbb348487164abadefee701b5bcd32338adfc03 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, Reference; |
+import 'package:kernel/ast.dart' show ProcedureKind; |
import '../../base/resolve_relative_uri.dart' show resolveRelativeUri; |
@@ -13,11 +13,11 @@ import '../../scanner/token.dart' show Token; |
import '../builder/builder.dart' |
show |
Builder, |
- BuiltinTypeBuilder, |
ClassBuilder, |
ConstructorReferenceBuilder, |
FormalParameterBuilder, |
FunctionTypeBuilder, |
+ InvalidTypeBuilder, |
LibraryBuilder, |
MemberBuilder, |
MetadataBuilder, |
@@ -54,6 +54,8 @@ 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> |
@@ -97,10 +99,11 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
bool canAddImplementationBuilders = false; |
- /// References to nodes exported by `export` declarations that: |
- /// - aren't ambiguous, or |
- /// - aren't hidden by local declarations. |
- List<Reference> additionalExports; |
+ /// 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(), |
@@ -521,10 +524,17 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
} |
exportScope.forEach((String name, Builder member) { |
if (member.parent != this) { |
- additionalExports ??= <Reference>[]; |
+ additionalExports ??= <List<String>>[]; |
Builder parent = member.parent; |
- if (parent is LibraryBuilder && member is! BuiltinTypeBuilder) { |
- additionalExports.add(member.target.reference); |
+ 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]); |
} |
} |
}); |