[L] Change in dart/sdk[main]: [modular_aot] Closures, part 2

0 views
Skip to first unread message

Alexander Markov (Gerrit)

unread,
May 12, 2026, 5:07:25 PM (16 hours ago) May 12
to Alexander Markov, Slava Egorov, Nate Biggs, Nicholas Shahan, Alexander Aprelev, Tess Strickland, Stephen Adams, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Slava Egorov

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Slava Egorov
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: Id8029dddd75b5f771ddf8197190d18aea9efd192
Gerrit-Change-Number: 503080
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Slava Egorov <veg...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 21:07:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Slava Egorov (Gerrit)

unread,
6:53 AM (2 hours ago) 6:53 AM
to Alexander Markov, Nate Biggs, Nicholas Shahan, Alexander Aprelev, Tess Strickland, Stephen Adams, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org
Attention needed from Alexander Markov

Slava Egorov voted and added 1 comment

Votes added by Slava Egorov

Code-Review+1

1 comment

File pkg/cfg/testcases/capturing.dart.expect
Line 10, Patchset 2 (Latest): v4 = AllocateContext()
Slava Egorov . resolved

It's a very interesting example where we end up with unnecessary contexts.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
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: Id8029dddd75b5f771ddf8197190d18aea9efd192
Gerrit-Change-Number: 503080
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Wed, 13 May 2026 10:53:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
8:58 AM (13 minutes ago) 8:58 AM
to Alexander Markov, Slava Egorov, Nate Biggs, Nicholas Shahan, Alexander Aprelev, Tess Strickland, Stephen Adams, dart-...@luci-project-accounts.iam.gserviceaccount.com, rev...@dartlang.org

Alexander Markov voted and added 2 comments

Votes added by Alexander Markov

Commit-Queue+2

2 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Alexander Markov . resolved

Thank you, Slava!

File pkg/cfg/testcases/capturing.dart.expect
Line 10, Patchset 2 (Latest): v4 = AllocateContext()
Slava Egorov . resolved

It's a very interesting example where we end up with unnecessary contexts.

Alexander Markov

Yeah, we should be able to capture `this` and other read-only variables by value and avoid allocating certain contexts. This is a future work, after switching to the new kernel AST encoding.

For mutable variable `i` we still need a context (unless closure call is inlined).

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: Id8029dddd75b5f771ddf8197190d18aea9efd192
Gerrit-Change-Number: 503080
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Wed, 13 May 2026 12:58:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Slava Egorov <veg...@google.com>
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
8:58 AM (13 minutes ago) 8:58 AM
to Alexander Markov, Slava Egorov, Nate Biggs, Nicholas Shahan, Alexander Aprelev, Tess Strickland, Stephen Adams, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

Change information

Commit message:
[modular_aot] Closures, part 2
Change-Id: Id8029dddd75b5f771ddf8197190d18aea9efd192
Commit-Queue: Alexander Markov <alexm...@google.com>
Reviewed-by: Slava Egorov <veg...@google.com>
Files:
  • M pkg/cfg/lib/front_end/ast_to_ir.dart
  • M pkg/cfg/lib/front_end/computed_scopes.dart
  • M pkg/cfg/lib/ir/field.dart
  • M pkg/cfg/lib/ir/flow_graph_builder.dart
  • M pkg/cfg/lib/ir/flow_graph_checker.dart
  • M pkg/cfg/lib/ir/functions.dart
  • M pkg/cfg/lib/ir/instructions.dart
  • M pkg/cfg/testcases/capturing.dart
  • M pkg/cfg/testcases/capturing.dart.expect
  • M pkg/native_compiler/lib/back_end/arm64/code_generator.dart
  • M pkg/native_compiler/lib/back_end/arm64/constraints.dart
  • M pkg/native_compiler/lib/runtime/type_utils.dart
  • M pkg/native_compiler/testcases/register_allocator_test.dart.expect
Change size: L
Delta: 13 files changed, 481 insertions(+), 312 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Slava Egorov
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: Id8029dddd75b5f771ddf8197190d18aea9efd192
Gerrit-Change-Number: 503080
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages