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

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

Issue 3004973002: Revert "Store actual Reference(s) for additional exports." (Closed)
Patch Set: Update status file. 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/scope.dart ('k') | pkg/front_end/test/fasta/ambiguous_export_test.dart » ('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 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]);
}
}
});
« no previous file with comments | « pkg/front_end/lib/src/fasta/scope.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