[L] Change in dart/sdk[main]: [cfe][PrimaryConstructor] Refactor handling of formals in body builder

0 views
Skip to first unread message

Johnni Winther (Gerrit)

unread,
Jan 9, 2026, 5:33:29 AM (2 days ago) Jan 9
to Chloe Stefantsova, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Chloe Stefantsova

Johnni Winther added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Johnni Winther . resolved

ping

Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I910ecc95fc718da9ce71f406b28f0da2be442a62
Gerrit-Change-Number: 471440
Gerrit-PatchSet: 3
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 10:33:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Chloe Stefantsova (Gerrit)

unread,
Jan 9, 2026, 8:01:19 AM (2 days ago) Jan 9
to Johnni Winther, Chloe Stefantsova, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther

Chloe Stefantsova voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I910ecc95fc718da9ce71f406b28f0da2be442a62
Gerrit-Change-Number: 471440
Gerrit-PatchSet: 3
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 13:01:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
Jan 9, 2026, 8:41:25 AM (2 days ago) Jan 9
to Chloe Stefantsova, Commit Queue, dart-fe-te...@google.com, rev...@dartlang.org

Johnni Winther voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I910ecc95fc718da9ce71f406b28f0da2be442a62
Gerrit-Change-Number: 471440
Gerrit-PatchSet: 3
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 13:41:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Jan 9, 2026, 8:51:40 AM (2 days ago) Jan 9
to Johnni Winther, Chloe Stefantsova, dart-fe-te...@google.com, rev...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
[cfe][PrimaryConstructor] Refactor handling of formals in body builder

Previously the formal parameters where passed both from the BodyBuilderContext and from the BodyBuilder.

Given that primary constructor body declaration cannot have direct access to the formal parameters on the primary constructor declaration, since there are not parsed together, the handling of formal parameters could not be done consistently with other function-like declarations.

This change normalizes the handling to only rely on the formals from BodyBuilderContext.
Change-Id: I910ecc95fc718da9ce71f406b28f0da2be442a62
Commit-Queue: Johnni Winther <johnni...@google.com>
Reviewed-by: Chloe Stefantsova <cstefa...@google.com>
Files:
  • M pkg/front_end/lib/src/builder/formal_parameter_builder.dart
  • M pkg/front_end/lib/src/fragment/constructor/body_builder_context.dart
  • M pkg/front_end/lib/src/fragment/constructor/declaration.dart
  • M pkg/front_end/lib/src/fragment/constructor/encoding.dart
  • M pkg/front_end/lib/src/fragment/factory/body_builder_context.dart
  • M pkg/front_end/lib/src/fragment/factory/declaration.dart
  • M pkg/front_end/lib/src/fragment/factory/encoding.dart
  • M pkg/front_end/lib/src/fragment/getter/body_builder_context.dart
  • M pkg/front_end/lib/src/fragment/getter/declaration.dart
  • M pkg/front_end/lib/src/fragment/getter/encoding.dart
  • M pkg/front_end/lib/src/fragment/method/body_builder_context.dart
  • M pkg/front_end/lib/src/fragment/method/declaration.dart
  • M pkg/front_end/lib/src/fragment/method/encoding.dart
  • M pkg/front_end/lib/src/fragment/setter/body_builder_context.dart
  • M pkg/front_end/lib/src/fragment/setter/declaration.dart
  • M pkg/front_end/lib/src/fragment/setter/encoding.dart
  • M pkg/front_end/lib/src/kernel/body_builder.dart
  • M pkg/front_end/lib/src/kernel/body_builder_context.dart
  • M pkg/front_end/lib/src/kernel/body_builder_helpers.dart
  • M pkg/front_end/lib/src/kernel/resolver.dart
  • M pkg/front_end/lib/src/kernel/utils.dart
  • M pkg/front_end/lib/src/source/fragment_factory.dart
  • M pkg/front_end/lib/src/source/fragment_factory_impl.dart
  • M pkg/front_end/lib/src/source/outline_builder.dart
  • M pkg/front_end/lib/src/source/source_enum_builder.dart
Change size: L
Delta: 25 files changed, 237 insertions(+), 424 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Chloe Stefantsova
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I910ecc95fc718da9ce71f406b28f0da2be442a62
Gerrit-Change-Number: 471440
Gerrit-PatchSet: 4
Gerrit-Owner: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages