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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_enum_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/kernel/kernel_enum_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
index 6c44b1f74f183f04c08e0ace3e1daa22092bf9e0..8a8970988558dae736597cf979e7fdc6673122d8 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
@@ -193,9 +193,9 @@ class KernelEnumBuilder extends SourceClassBuilder
}
toStringMap.keyType = intType.build(libraryBuilder);
toStringMap.valueType = stringType.build(libraryBuilder);
- KernelFieldBuilder indexFieldBuilder = members["index"];
+ KernelFieldBuilder indexFieldBuilder = this["index"];
Field indexField = indexFieldBuilder.build(libraryBuilder);
- KernelProcedureBuilder toStringBuilder = members["toString"];
+ KernelProcedureBuilder toStringBuilder = this["toString"];
toStringBuilder.body = new ReturnStatement(new MethodInvocation(
toStringMap,
indexGetName,
@@ -205,14 +205,14 @@ class KernelEnumBuilder extends SourceClassBuilder
List<Expression> values = <Expression>[];
for (int i = 0; i < constantNamesAndOffsets.length; i += 2) {
String name = constantNamesAndOffsets[i];
- KernelFieldBuilder builder = members[name];
+ KernelFieldBuilder builder = this[name];
values.add(new StaticGet(builder.build(libraryBuilder)));
}
- KernelFieldBuilder valuesBuilder = members["values"];
+ KernelFieldBuilder valuesBuilder = this["values"];
valuesBuilder.build(libraryBuilder);
valuesBuilder.initializer =
new ListLiteral(values, typeArgument: cls.rawType, isConst: true);
- KernelConstructorBuilder constructorBuilder = members[""];
+ KernelConstructorBuilder constructorBuilder = this[""];
Constructor constructor = constructorBuilder.build(libraryBuilder);
constructor.initializers.insert(
0,
@@ -222,7 +222,7 @@ class KernelEnumBuilder extends SourceClassBuilder
int index = 0;
for (int i = 0; i < constantNamesAndOffsets.length; i += 2) {
String constant = constantNamesAndOffsets[i];
- KernelFieldBuilder field = members[constant];
+ KernelFieldBuilder field = this[constant];
field.build(libraryBuilder);
Arguments arguments =
new Arguments(<Expression>[new IntLiteral(index++)]);
@@ -232,5 +232,8 @@ class KernelEnumBuilder extends SourceClassBuilder
return super.build(libraryBuilder);
}
- Builder findConstructorOrFactory(String name) => null;
+ @override
+ Builder findConstructorOrFactory(String name, int charOffset, Uri uri) {
+ return null;
+ }
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698