Skip to content

Commit 4c8c0da

Browse files
johnniwintherCommit Queue
authored andcommitted
[cfe] Remove modifiers from SourceMemberBuilder
- and isFinal from Builder Change-Id: Ibfc3b29724279760c8c98fda4f5a7b24186ace2b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391360 Reviewed-by: Jens Johansen <[email protected]>
1 parent bf16a40 commit 4c8c0da

11 files changed

+37
-61
lines changed

pkg/front_end/lib/src/base/scope.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,10 +565,6 @@ class AccessErrorBuilder extends ProblemBuilder {
565565
@override
566566
Builder? get parent => builder.parent;
567567

568-
@override
569-
// Coverage-ignore(suite): Not run.
570-
bool get isFinal => builder.isFinal;
571-
572568
@override
573569
bool get isField => builder.isField;
574570

pkg/front_end/lib/src/builder/builder.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ abstract class Builder {
3232

3333
bool get isField;
3434

35-
bool get isFinal;
36-
3735
bool get isGetter;
3836

3937
bool get isExternal;
@@ -287,10 +285,6 @@ abstract class BuilderImpl implements Builder {
287285
@override
288286
bool get isField => false;
289287

290-
@override
291-
// Coverage-ignore(suite): Not run.
292-
bool get isFinal => false;
293-
294288
@override
295289
bool get isGetter => false;
296290

pkg/front_end/lib/src/builder/class_builder.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ abstract class ClassBuilder implements DeclarationBuilder, ClassMemberAccess {
117117

118118
bool get isInterface;
119119

120-
@override
121120
bool get isFinal;
122121

123122
bool get declaresConstConstructor;

pkg/front_end/lib/src/builder/formal_parameter_builder.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ class FormalParameterBuilder extends BuilderImpl
148148
@override
149149
bool get isConst => modifiers.isConst;
150150

151-
@override
152-
bool get isFinal => modifiers.isFinal;
153-
154151
// An initializing formal parameter might be final without its
155152
// VariableDeclaration being final. See
156153
// [ProcedureBuilder.computeFormalParameterInitializerScope]..
@@ -173,7 +170,7 @@ class FormalParameterBuilder extends BuilderImpl
173170
// `null` is used in [VariableDeclarationImpl] to signal an omitted
174171
// type.
175172
type: isTypeOmitted ? null : builtType,
176-
isFinal: isFinal,
173+
isFinal: modifiers.isFinal,
177174
isConst: false,
178175
isInitializingFormal: isInitializingFormal,
179176
isCovariantByDeclaration: isCovariantByDeclaration,

pkg/front_end/lib/src/dill/dill_member_builder.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ class DillFieldBuilder extends DillMemberBuilder implements FieldBuilder {
156156
// Coverage-ignore(suite): Not run.
157157
bool get isConst => field.isConst;
158158

159-
@override
160-
// Coverage-ignore(suite): Not run.
161-
bool get isFinal => field.isFinal;
162-
163159
@override
164160
bool get isStatic => field.isStatic;
165161
}

pkg/front_end/lib/src/kernel/kernel_variable_builder.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ class VariableBuilderImpl extends BuilderImpl implements VariableBuilder {
3131
@override
3232
bool get isConst => variable.isConst;
3333

34-
@override
35-
// Coverage-ignore(suite): Not run.
36-
bool get isFinal => variable.isFinal;
37-
3834
@override
3935
bool get isAssignable => variable.isAssignable;
4036

pkg/front_end/lib/src/source/source_extension_builder.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ class SourceExtensionBuilder extends ExtensionBuilderImpl
132132
// Coverage-ignore(suite): Not run.
133133
bool get isConst => _modifiers.isConst;
134134

135-
@override
136-
// Coverage-ignore(suite): Not run.
137-
bool get isFinal => _modifiers.isFinal;
138-
139135
@override
140136
// Coverage-ignore(suite): Not run.
141137
bool get isStatic => _modifiers.isStatic;

pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,6 @@ class SourceExtensionTypeDeclarationBuilder
151151
// Coverage-ignore(suite): Not run.
152152
bool get isConst => _modifiers.isConst;
153153

154-
@override
155-
// Coverage-ignore(suite): Not run.
156-
bool get isFinal => _modifiers.isFinal;
157-
158154
@override
159155
// Coverage-ignore(suite): Not run.
160156
bool get isStatic => _modifiers.isStatic;

pkg/front_end/lib/src/source/source_field_builder.dart

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl
5252

5353
final MemberName _memberName;
5454

55-
@override
5655
final Modifiers modifiers;
5756

5857
late FieldEncoding _fieldEncoding;
@@ -320,6 +319,26 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl
320319
// Coverage-ignore(suite): Not run.
321320
Iterable<MetadataBuilder>? get metadataForTesting => metadata;
322321

322+
@override
323+
bool get isAugmentation => modifiers.isAugment;
324+
325+
@override
326+
bool get isExternal => modifiers.isExternal;
327+
328+
@override
329+
bool get isAbstract => modifiers.isAbstract;
330+
331+
@override
332+
bool get isConst => modifiers.isConst;
333+
334+
bool get isFinal => modifiers.isFinal;
335+
336+
@override
337+
bool get isStatic => modifiers.isStatic;
338+
339+
@override
340+
bool get isAugment => modifiers.isAugment;
341+
323342
@override
324343
Builder get parent => declarationBuilder ?? libraryBuilder;
325344

pkg/front_end/lib/src/source/source_function_builder.dart

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ abstract class SourceFunctionBuilderImpl extends SourceMemberBuilderImpl
121121
@override
122122
final List<MetadataBuilder>? metadata;
123123

124-
@override
125124
final Modifiers modifiers;
126125

127126
@override
@@ -160,11 +159,26 @@ abstract class SourceFunctionBuilderImpl extends SourceMemberBuilderImpl
160159
AsyncMarker get asyncModifier;
161160

162161
@override
163-
bool get isConstructor => false;
162+
bool get isAugmentation => modifiers.isAugment;
163+
164+
@override
165+
bool get isExternal => modifiers.isExternal;
164166

165167
@override
166168
bool get isAbstract => modifiers.isAbstract;
167169

170+
@override
171+
bool get isConst => modifiers.isConst;
172+
173+
@override
174+
bool get isStatic => modifiers.isStatic;
175+
176+
@override
177+
bool get isAugment => modifiers.isAugment;
178+
179+
@override
180+
bool get isConstructor => false;
181+
168182
@override
169183
bool get isRegularMethod => identical(ProcedureKind.Method, kind);
170184

@@ -180,9 +194,6 @@ abstract class SourceFunctionBuilderImpl extends SourceMemberBuilderImpl
180194
@override
181195
bool get isFactory => identical(ProcedureKind.Factory, kind);
182196

183-
@override
184-
bool get isExternal => modifiers.isExternal;
185-
186197
@override
187198
// Coverage-ignore(suite): Not run.
188199
bool get isAssignable => false;

0 commit comments

Comments
 (0)