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

Unified Diff: pkg/front_end/lib/src/fasta/builder/library_builder.dart

Issue 2991753002: Add export dependencies to Kernel libraries and use them to resynthesize ExportElement(s) in Analyz… (Closed)
Patch Set: Extract exportedLibrary. Created 3 years, 5 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/builder/library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/library_builder.dart b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
index 1701a5c9b993886903e634a6791b29cb27368a76..bd62bdc8f6e2fbb32e804f6188e497d057ddc01a 100644
--- a/pkg/front_end/lib/src/fasta/builder/library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/library_builder.dart
@@ -37,7 +37,7 @@ import 'builder.dart'
abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
final Scope scope;
- final Scope exports;
+ final Scope exportScope;
final ScopeBuilder scopeBuilder;
@@ -56,11 +56,11 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
bool mayImplementRestrictedTypes = false;
- LibraryBuilder(Uri fileUri, this.scope, this.exports)
+ LibraryBuilder(Uri fileUri, this.scope, this.exportScope)
: fileUri = fileUri,
relativeFileUri = relativizeUri(fileUri),
scopeBuilder = new ScopeBuilder(scope),
- exportScopeBuilder = new ScopeBuilder(exports),
+ exportScopeBuilder = new ScopeBuilder(exportScope),
super(null, -1, fileUri);
Loader get loader;
@@ -103,7 +103,7 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
if (name.startsWith("_")) return false;
if (member is PrefixBuilder) return false;
Map<String, Builder> map =
- member.isSetter ? exports.setters : exports.local;
+ member.isSetter ? exportScope.setters : exportScope.local;
Builder existing = map[name];
if (existing == member) return false;
if (existing != null) {
@@ -149,8 +149,8 @@ abstract class LibraryBuilder<T extends TypeBuilder, R> extends Builder {
-1,
null);
}
- Builder cls =
- (bypassLibraryPrivacy ? scope : exports).lookup(className, -1, null);
+ Builder cls = (bypassLibraryPrivacy ? scope : exportScope)
+ .lookup(className, -1, null);
if (cls is ClassBuilder) {
// TODO(ahe): This code is similar to code in `endNewExpression` in
// `body_builder.dart`, try to share it.

Powered by Google App Engine
This is Rietveld 408576698