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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2788913002: Prepare for separate setter scope. (Closed)
Patch Set: Address comments. Created 3 years, 9 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/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 3234356e78ae0a96f76bbdfbb8d1d4c8a8e2c110..b4f385e97411f2048b1abd98c64c785a4f0bbead 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -309,9 +309,9 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
String name = identifier.name;
FieldBuilder field;
if (classBuilder != null) {
- field = classBuilder.members[name];
+ field = classBuilder[name];
} else {
- field = library.members[name];
+ field = library[name];
}
if (field.next != null) {
// TODO(ahe): This can happen, for example, if a final field is
@@ -352,7 +352,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
final member = this.member;
if (member is KernelConstructorBuilder) {
Constructor constructor = member.constructor;
- classBuilder.members.forEach((String name, Builder builder) {
+ classBuilder.forEach((String name, Builder builder) {
if (builder is KernelFieldBuilder && builder.isInstanceMember) {
// TODO(ahe): Compute initializers (as in `field = initializer`).
fieldInitializers[name] = new FieldInitializer(builder.field, null)
@@ -1788,7 +1788,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
String errorName;
if (type is ClassBuilder) {
- Builder b = type.findConstructorOrFactory(name);
+ Builder b = type.findConstructorOrFactory(name, token.charOffset, uri);
Member target;
if (b == null) {
// Not found. Reported below.
@@ -2887,7 +2887,7 @@ class FormalParameters {
new KernelVariableBuilder(parameter, builder, builder.fileUri);
}
}
- return new Scope(local, parent, isModifiable: false);
+ return new Scope(local, null, parent, isModifiable: false);
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/dill/dill_target.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698