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

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

Issue 2788913002: Prepare for separate setter scope. (Closed)
Patch Set: Address comments. Created 3 years, 8 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 4c5da4ffbe27380b92666269a9bb991e01c35a36..984f1f600e5f6dcb7c2135f54fef13f227bce84f 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
@@ -50,7 +50,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
final Map<String, Builder> exports = <String, Builder>{};
- final Scope scope = new Scope(<String, Builder>{}, null, isModifiable: false);
+ final Scope scope = new Scope.top();
final Uri fileUri;
@@ -303,7 +303,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
R build() {
assert(implementationBuilders.isEmpty);
- members.forEach((String name, Builder builder) {
+ forEach((String name, Builder builder) {
do {
buildBuilder(builder);
builder = builder.next;
@@ -369,7 +369,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
// The part is still included.
}
}
- part.members.forEach((String name, Builder builder) {
+ part.forEach((String name, Builder builder) {
if (builder.next != null) {
assert(builder.next.next == null);
addBuilder(name, builder.next, builder.next.charOffset);
@@ -383,8 +383,8 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
}
void buildInitialScopes() {
- members.forEach(addToExportScope);
- members.forEach((String name, Builder member) {
+ forEach(addToExportScope);
+ forEach((String name, Builder member) {
addToScope(name, member, member.charOffset, false);
});
}
@@ -440,7 +440,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
for (T t in types) {
t.resolveIn(scope);
}
- members.forEach((String name, Builder member) {
+ forEach((String name, Builder member) {
typeCount += member.resolveTypes(this);
});
return typeCount;
@@ -448,7 +448,7 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R>
int resolveConstructors(_) {
int count = 0;
- members.forEach((String name, Builder member) {
+ forEach((String name, Builder member) {
count += member.resolveConstructors(this);
});
return count;
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_class_builder.dart ('k') | pkg/front_end/lib/src/fasta/source/source_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698