Skip to content

Commit f46aa56

Browse files
johnniwintherCommit Queue
authored andcommitted
[cfe] Remove unused properties from BodyBuilderContext
Change-Id: I75f6a3cdf63b32555ae96f181f99bfaec1de5e56 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391403 Reviewed-by: Chloe Stefantsova <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
1 parent a3085e7 commit f46aa56

27 files changed

+118
-537
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,7 @@ mixin ErroneousMemberBuilderMixin implements SourceMemberBuilder {
764764
}
765765

766766
@override
767-
BodyBuilderContext createBodyBuilderContext(
768-
{required bool inOutlineBuildingPhase,
769-
required bool inMetadata,
770-
required bool inConstFields}) {
767+
BodyBuilderContext createBodyBuilderContext() {
771768
throw new UnsupportedError(
772769
'$runtimeType.bodyBuilderContextForAnnotations}');
773770
}

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,8 @@ class FormalParameterBuilder extends BuilderImpl
276276
final DeclarationBuilder declarationBuilder =
277277
parent.declarationBuilder!;
278278
LookupScope scope = declarationBuilder.scope;
279-
BodyBuilderContext bodyBuilderContext = new ParameterBodyBuilderContext(
280-
this,
281-
inOutlineBuildingPhase: true,
282-
inMetadata: false,
283-
inConstFields: false);
279+
BodyBuilderContext bodyBuilderContext =
280+
new ParameterBodyBuilderContext(this);
284281
BodyBuilder bodyBuilder = libraryBuilder.loader
285282
.createBodyBuilderForOutlineExpression(
286283
libraryBuilder, bodyBuilderContext, scope, fileUri);

pkg/front_end/lib/src/fragment/constructor.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,8 @@ class _ConstructorBodyBuildingContext implements FunctionBodyBuildingContext {
9999
}
100100

101101
@override
102-
BodyBuilderContext createBodyBuilderContext(
103-
{required bool inOutlineBuildingPhase,
104-
required bool inMetadata,
105-
required bool inConstFields}) {
106-
return _fragment.builder.createBodyBuilderContext(
107-
inOutlineBuildingPhase: inOutlineBuildingPhase,
108-
inMetadata: inMetadata,
109-
inConstFields: inConstFields);
102+
BodyBuilderContext createBodyBuilderContext() {
103+
return _fragment.builder.createBodyBuilderContext();
110104
}
111105

112106
@override

pkg/front_end/lib/src/fragment/factory.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,8 @@ class _FactoryBodyBuildingContext implements FunctionBodyBuildingContext {
8383
}
8484

8585
@override
86-
BodyBuilderContext createBodyBuilderContext(
87-
{required bool inOutlineBuildingPhase,
88-
required bool inMetadata,
89-
required bool inConstFields}) {
90-
return _fragment.builder.createBodyBuilderContext(
91-
inOutlineBuildingPhase: inOutlineBuildingPhase,
92-
inMetadata: inMetadata,
93-
inConstFields: inConstFields);
86+
BodyBuilderContext createBodyBuilderContext() {
87+
return _fragment.builder.createBodyBuilderContext();
9488
}
9589

9690
@override

pkg/front_end/lib/src/fragment/function.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ abstract class FunctionBodyBuildingContext {
1818
// TODO(johnniwinther): Avoid the need for this.
1919
bool get shouldBuild;
2020

21-
BodyBuilderContext createBodyBuilderContext(
22-
{required bool inOutlineBuildingPhase,
23-
required bool inMetadata,
24-
required bool inConstFields});
21+
BodyBuilderContext createBodyBuilderContext();
2522

2623
LookupScope get typeParameterScope;
2724

pkg/front_end/lib/src/fragment/getter.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,8 @@ class _GetterBodyBuildingContext implements FunctionBodyBuildingContext {
8686
}
8787

8888
@override
89-
BodyBuilderContext createBodyBuilderContext(
90-
{required bool inOutlineBuildingPhase,
91-
required bool inMetadata,
92-
required bool inConstFields}) {
93-
return _fragment.builder.createBodyBuilderContext(
94-
inOutlineBuildingPhase: inOutlineBuildingPhase,
95-
inMetadata: inMetadata,
96-
inConstFields: inConstFields);
89+
BodyBuilderContext createBodyBuilderContext() {
90+
return _fragment.builder.createBodyBuilderContext();
9791
}
9892

9993
@override

pkg/front_end/lib/src/fragment/method.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,8 @@ class _MethodBodyBuildingContext implements FunctionBodyBuildingContext {
8888
}
8989

9090
@override
91-
BodyBuilderContext createBodyBuilderContext(
92-
{required bool inOutlineBuildingPhase,
93-
required bool inMetadata,
94-
required bool inConstFields}) {
95-
return _fragment.builder.createBodyBuilderContext(
96-
inOutlineBuildingPhase: inOutlineBuildingPhase,
97-
inMetadata: inMetadata,
98-
inConstFields: inConstFields);
91+
BodyBuilderContext createBodyBuilderContext() {
92+
return _fragment.builder.createBodyBuilderContext();
9993
}
10094

10195
@override

pkg/front_end/lib/src/fragment/primary_constructor.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,8 @@ class _PrimaryConstructorBodyBuildingContext
9191
}
9292

9393
@override
94-
BodyBuilderContext createBodyBuilderContext(
95-
{required bool inOutlineBuildingPhase,
96-
required bool inMetadata,
97-
required bool inConstFields}) {
98-
return _fragment.builder.createBodyBuilderContext(
99-
inOutlineBuildingPhase: inOutlineBuildingPhase,
100-
inMetadata: inMetadata,
101-
inConstFields: inConstFields);
94+
BodyBuilderContext createBodyBuilderContext() {
95+
return _fragment.builder.createBodyBuilderContext();
10296
}
10397

10498
@override

pkg/front_end/lib/src/fragment/setter.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,8 @@ class _SetterBodyBuildingContext implements FunctionBodyBuildingContext {
8686
}
8787

8888
@override
89-
BodyBuilderContext createBodyBuilderContext(
90-
{required bool inOutlineBuildingPhase,
91-
required bool inMetadata,
92-
required bool inConstFields}) {
93-
return _fragment.builder.createBodyBuilderContext(
94-
inOutlineBuildingPhase: inOutlineBuildingPhase,
95-
inMetadata: inMetadata,
96-
inConstFields: inConstFields);
89+
BodyBuilderContext createBodyBuilderContext() {
90+
return _fragment.builder.createBodyBuilderContext();
9791
}
9892

9993
@override

0 commit comments

Comments
 (0)