[M] Change in dart/sdk[main]: [cfe] Produce synthetic assignments in for-in loops in output form

0 views
Skip to first unread message

Chloe Stefantsova (Gerrit)

unread,
Mar 13, 2026, 10:44:03 AMMar 13
to Chloe Stefantsova, Commit Queue, Alexander Markov, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org

Chloe Stefantsova added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Chloe Stefantsova . resolved

Johnni, Alex, PTAL. For the redness on the bot vm-dyn-mac-debug-arm64-try, I'm not sure my CL is the cause of the failures. Please share if you have more insight into it.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not 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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 5
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Comment-Date: Fri, 13 Mar 2026 14:43:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Mar 13, 2026, 3:15:13 PMMar 13
to Chloe Stefantsova, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Chloe Stefantsova

Alexander Markov voted and added 1 comment

Votes added by Alexander Markov

Code-Review+1

1 comment

Patchset-level comments
Chloe Stefantsova . resolved

Johnni, Alex, PTAL. For the redness on the bot vm-dyn-mac-debug-arm64-try, I'm not sure my CL is the cause of the failures. Please share if you have more insight into it.

Alexander Markov

The failures are the new tests after co19 roll (`new test -> CompileTimeError`). They are also failing on other bots and those failures are approved, so they are not related to this CL. You can also rerun the red bot after corresponding nightly bot cycles on the CI (e.g. tomorrow) and they should disappear.

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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 5
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Comment-Date: Fri, 13 Mar 2026 19:15:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Chloe Stefantsova <cstefa...@google.com>
satisfied_requirement
open
diffy

Chloe Stefantsova (Gerrit)

unread,
Mar 16, 2026, 4:12:24 AMMar 16
to Chloe Stefantsova, Johnni Winther, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther

Chloe Stefantsova voted Commit-Queue+1

Commit-Queue+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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 5
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 08:12:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
Mar 16, 2026, 5:24:30 AMMar 16
to Chloe Stefantsova, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org
Attention needed from Chloe Stefantsova

Johnni Winther voted Code-Review+1

Code-Review+1
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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 5
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Attention: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 09:24:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chloe Stefantsova (Gerrit)

unread,
Mar 16, 2026, 5:48:12 AMMar 16
to Chloe Stefantsova, Johnni Winther, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org

Chloe Stefantsova voted and added 1 comment

Votes added by Chloe Stefantsova

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Chloe Stefantsova . resolved

Thank you for the review and the discussion, Johnni and Alex!

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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 7
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 09:48:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chloe Stefantsova (Gerrit)

unread,
Mar 16, 2026, 6:39:19 AMMar 16
to Chloe Stefantsova, Johnni Winther, Alexander Markov, Commit Queue, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org

Chloe Stefantsova 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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 7
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 10:39:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Mar 16, 2026, 6:50:40 AMMar 16
to Chloe Stefantsova, Johnni Winther, Alexander Markov, Jens Johansen, dart-fe-te...@google.com, rev...@dartlang.org

Commit Queue submitted the change with unreviewed changes

Unreviewed changes

5 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: pkg/dart2bytecode/test/bytecode_generator_test.dart
Insertions: 0, Deletions: 8.

The diff is too large to show. Please review the diff.
```

Change information

Commit message:
[cfe] Produce synthetic assignments in for-in loops in output form

In the new variable encoding, variables exist either in the internal
form (InternalLocalVariable, InternalSyntheticVariable, etc) or in the
output form, which is passed to the backends. Normally, type inference
is the mechanism that consumes the variables in the internal forma and
produces the variables in the output form. However, some expressions are
produced before type inference (in the BodyBuilder) and will never be
processed by type inference. Synthetic assignments in for-in loops is an
example of such expressions.

This CL modifies the expression generators used by the BodyBuilder, so
that the synthetic assignments are produced directly in the output form,
since they will not be touched by type inference.

This change makes the `loop.dart`, `switch.dart`,
`instance_creation.dart`, `asserts.dart`, `field_initializers.dart`,
`optional_params.dart`, `bootstrapping.dart`, `ffi.dart`, and
`invisible.dart` tests of the bytecode generator to pass, so it can be
removed from the excluded tests when the closure-context-lowering
experiment is enabled.

Part of https://github.com/dart-lang/sdk/issues/61572
Change-Id: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Reviewed-by: Alexander Markov <alexm...@google.com>
Reviewed-by: Johnni Winther <johnni...@google.com>
Commit-Queue: Chloe Stefantsova <cstefa...@google.com>
Files:
  • M pkg/dart2bytecode/test/bytecode_generator_test.dart
  • M pkg/front_end/lib/src/kernel/body_builder.dart
  • M pkg/front_end/lib/src/kernel/expression_generator.dart
  • M pkg/kernel/lib/src/ast/variables.dart
Change size: M
Delta: 4 files changed, 172 insertions(+), 58 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Johnni Winther, +1 by Alexander Markov
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: I8d828b7da8e33c6e9fa6bfdda1f201bcdfad9ac4
Gerrit-Change-Number: 487840
Gerrit-PatchSet: 8
Gerrit-Owner: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Chloe Stefantsova <cstefa...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-CC: Jens Johansen <je...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages