[L] Change in dart/sdk[main]: [cfe] Don't create old variables when the experiment is enabled

0 views
Skip to first unread message

Chloe Stefantsova (Gerrit)

unread,
8:49 AM (3 hours ago) 8:49 AM
to Chloe Stefantsova, Johnni Winther, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Chloe Stefantsova and Johnni Winther

Chloe Stefantsova voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
  • Johnni Winther
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: I13f0e7f54417d936c8b4e3240049427d0218328f
Gerrit-Change-Number: 497240
Gerrit-PatchSet: 4
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Wed, 22 Apr 2026 12:49:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
9:29 AM (2 hours ago) 9:29 AM
to Chloe Stefantsova, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Chloe Stefantsova

Johnni Winther voted and added 5 comments

Votes added by Johnni Winther

Code-Review+1

5 comments

File pkg/front_end/lib/src/fragment/constructor/encoding.dart
Line 629, Patchset 4 (Latest): libraryBuilder
.loader
.target
.backendTarget
.flags
.isClosureContextLoweringEnabled
?
// Coverage-ignore(suite): Not run.
(new PositionalParameter(
cosmeticName: syntheticThisName,
type: _computeThisType(declarationBuilder, typeArguments),

isFinal: true,
isLowered: true,
)..fileOffset = fileOffset)
: (new VariableDeclarationImpl(
syntheticThisName,
isFinal: true,
type: _computeThisType(declarationBuilder, typeArguments),
)
..fileOffset = fileOffset
..isLowered = true);
Johnni Winther . unresolved

Not for this CL: Maybe we should have an `InternalVariableCreator` interface through which we create all variables.

File pkg/front_end/lib/src/fragment/getter/declaration.dart
Line 291, Patchset 4 (Latest): isClosureContextLoweringEnabled: _fragment
.builder
.libraryBuilder
Johnni Winther . unresolved

Use `libraryBuilder` instead.

Not for this CL: Maybe add an `isClosureContextLoweringEnabled` getter on `SourceLoader` for easier access.

File pkg/front_end/lib/src/fragment/method/declaration.dart
Line 262, Patchset 4 (Latest): isClosureContextLoweringEnabled: _fragment
.builder
.libraryBuilder
Johnni Winther . unresolved

Use `enclosingClassBuilder.libraryBuilder` instead.

File pkg/front_end/lib/src/fragment/primary_constructor_field.dart
Line 406, Patchset 4 (Latest): builder.declarationBuilder as SourceClassBuilder,
Johnni Winther . unresolved

Extract a `SourceClassBuilder classBuilder = builder.declarationBuilder as SourceClassBuilder;` variable and use `classBuilder.libraryBuilder` instead of `_fragment.builder.libraryBuilder` below.

File pkg/front_end/lib/src/fragment/setter/declaration.dart
Line 290, Patchset 4 (Latest): isClosureContextLoweringEnabled: _fragment
.builder
.libraryBuilder
Johnni Winther . unresolved

Use `libraryBuilder` instead.

Open in Gerrit

Related details

Attention is currently required from:
  • Chloe Stefantsova
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: I13f0e7f54417d936c8b4e3240049427d0218328f
Gerrit-Change-Number: 497240
Gerrit-PatchSet: 4
Gerrit-Owner: Chloe Stefantsova <cstefa...@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: Wed, 22 Apr 2026 13:29:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages