[M] Change in dart/sdk[main]: [vm/sdk] Use FinalThreadLocal for Iterable toString.

0 views
Skip to first unread message

Alexander Aprelev (Gerrit)

unread,
Dec 1, 2025, 11:56:47 AM12/1/25
to Alexander Aprelev, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Slava Egorov

Alexander Aprelev voted and added 1 comment

Votes added by Alexander Aprelev

Commit-Queue+1

1 comment

File sdk/lib/_internal/vm_shared/lib/iterable_patch.dart
Line 15, Patchset 17: if (!_toStringVisiting.isBound) {
Slava Egorov . resolved

Given that we introduced `FinalThreadLocal` anyway... Maybe you can rewrite this code to use that instead. And I think when you do that you can share the iterableToFullString and iterableToShortString methods back - it becomes platform independent.

Platform dependent part is `toStringVisiting`, which for VM becomes:

```
List get toStringVisiting => _toStringVisiting.value;
...
```

And the rest of code can be shared.

Alexander Aprelev

Done

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 satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
Gerrit-Change-Number: 451841
Gerrit-PatchSet: 18
Gerrit-Owner: Alexander Aprelev <a...@google.com>
Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-Attention: Slava Egorov <veg...@google.com>
Gerrit-Comment-Date: Mon, 01 Dec 2025 16:56:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Slava Egorov <veg...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Slava Egorov (Gerrit)

unread,
Dec 2, 2025, 7:30:05 AM12/2/25
to Alexander Aprelev, Lasse Nielsen, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Alexander Aprelev

Slava Egorov voted and added 1 comment

Votes added by Slava Egorov

Code-Review+1

1 comment

File sdk/lib/core/iterable.dart
Line 947, Patchset 23 (Latest): for (int i = 0; i < toStringVisiting.length; i++) {
Slava Egorov . unresolved

Consider caching result of getter, e.g.

```
final visiting = toStringVisiting;
for (int i = 0; i < visiting.length; i++) {
if (identical(object, visiting[i])) return true;
}
return false;
```
Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Aprelev
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
Gerrit-Change-Number: 451841
Gerrit-PatchSet: 23
Gerrit-Owner: Alexander Aprelev <a...@google.com>
Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-Attention: Alexander Aprelev <a...@google.com>
Gerrit-Comment-Date: Tue, 02 Dec 2025 12:29:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Aprelev (Gerrit)

unread,
Dec 2, 2025, 9:08:56 AM12/2/25
to Alexander Aprelev, Slava Egorov, Lasse Nielsen, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org

Alexander Aprelev voted and added 2 comments

Votes added by Alexander Aprelev

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 25 (Latest):
Alexander Aprelev . resolved

thank you Slava

File sdk/lib/core/iterable.dart
Line 947, Patchset 23: for (int i = 0; i < toStringVisiting.length; i++) {
Slava Egorov . resolved

Consider caching result of getter, e.g.

```
final visiting = toStringVisiting;
for (int i = 0; i < visiting.length; i++) {
if (identical(object, visiting[i])) return true;
}
return false;
```
Alexander Aprelev

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 25
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 14:08:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Slava Egorov <veg...@google.com>
    satisfied_requirement
    open
    diffy

    Lasse Nielsen (Gerrit)

    unread,
    Dec 2, 2025, 10:20:36 AM12/2/25
    to Alexander Aprelev, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Alexander Aprelev

    Lasse Nielsen voted and added 8 comments

    Votes added by Lasse Nielsen

    Code-Review-1

    8 comments

    Patchset-level comments
    Lasse Nielsen . resolved

    Don't move map-function into `Iterable` and don't make the helper functions public.

    File pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
    Line 890, Patchset 25 (Latest): const smallChangeThreshold = 13;
    Lasse Nielsen . resolved

    (Arbitrary number just changed arbitrarily, for _reasons_! 😜)

    File sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
    Line 768, Patchset 25 (Latest): static List<Object> get toStringVisiting => _toStringVisiting;
    Lasse Nielsen . unresolved
    That looks like it's just
    ```dart
    @patch
    static final List<Object> toStringVisiting = [];
    ```
    with more steps. Unless that's not an allowed patch, then it's *necessary* more steps. Is it necessary?
    File sdk/lib/collection/maps.dart
    Line 110, Patchset 25 (Latest): static String mapToString(Map<Object?, Object?> m) => Iterable.mapToString(m);
    Lasse Nielsen . unresolved

    Don't move this function. It doesn't belong in `Iterable`.

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25 (Latest): static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . unresolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Line 946, Patchset 25 (Latest): static bool isToStringVisiting(Object object) {
    Lasse Nielsen . unresolved

    This should *probably* not be public.

    Line 955, Patchset 25 (Latest): external static List<Object> get toStringVisiting;
    Lasse Nielsen . unresolved

    This should _definitely_ not be public.
    (Which tips the `toStringVisiting` towards not being public either.)

    File sdk/lib/internal/internal.dart
    Line 1135, Patchset 25 (Parent):}
    Lasse Nielsen . unresolved

    Why moved?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Aprelev
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 25
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Alexander Aprelev <a...@google.com>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 15:20:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    blocking_requirement
    open
    diffy

    Alexander Aprelev (Gerrit)

    unread,
    Dec 2, 2025, 11:59:40 AM12/2/25
    to Alexander Aprelev, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Lasse Nielsen

    Alexander Aprelev added 3 comments

    File sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
    Line 768, Patchset 25 (Latest): static List<Object> get toStringVisiting => _toStringVisiting;
    Lasse Nielsen . resolved
    That looks like it's just
    ```dart
    @patch
    static final List<Object> toStringVisiting = [];
    ```
    with more steps. Unless that's not an allowed patch, then it's *necessary* more steps. Is it necessary?
    Alexander Aprelev

    Patching getter with final variable doesn't work, and I believe it has to remain getter for vm/iterable_patch.dart FinalThreadLocal implementation.

    File sdk/lib/collection/maps.dart
    Line 110, Patchset 25 (Latest): static String mapToString(Map<Object?, Object?> m) => Iterable.mapToString(m);
    Lasse Nielsen . resolved

    Don't move this function. It doesn't belong in `Iterable`.

    Alexander Aprelev

    The function still remains, it's just that its implementation delegates to Iterable.mapToString because that's where patched toStringVisiting lives.

    File sdk/lib/internal/internal.dart
    Lasse Nielsen . resolved

    Why moved?

    Alexander Aprelev

    They were moved because toStringVisiting has to be patched, has different implementation on vm vs other platforms.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lasse Nielsen
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 25
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Lasse Nielsen <l...@google.com>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 16:59:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Lasse Nielsen <l...@google.com>
    satisfied_requirement
    blocking_requirement
    open
    diffy

    Alexander Aprelev (Gerrit)

    unread,
    Dec 2, 2025, 5:57:00 PM12/2/25
    to Alexander Aprelev, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Lasse Nielsen and Slava Egorov

    Alexander Aprelev voted and added 3 comments

    Votes added by Alexander Aprelev

    Commit-Queue+1

    3 comments

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . resolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Alexander Aprelev

    I added Since and added entry to changelog.
    I'm not sure I understand how to share it since it needs to be part of this class.

    Line 946, Patchset 25: static bool isToStringVisiting(Object object) {
    Lasse Nielsen . resolved

    This should *probably* not be public.

    Alexander Aprelev

    Done

    Line 955, Patchset 25: external static List<Object> get toStringVisiting;
    Lasse Nielsen . resolved

    This should _definitely_ not be public.
    (Which tips the `toStringVisiting` towards not being public either.)

    Alexander Aprelev

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lasse Nielsen
    • Slava Egorov
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 26
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Lasse Nielsen <l...@google.com>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 22:56:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Lasse Nielsen <l...@google.com>
    unsatisfied_requirement
    blocking_requirement
    satisfied_requirement
    open
    diffy

    Nate Bosch (Gerrit)

    unread,
    Dec 2, 2025, 6:48:44 PM12/2/25
    to Alexander Aprelev, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Alexander Aprelev, Lasse Nielsen and Slava Egorov

    Nate Bosch added 1 comment

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . unresolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Alexander Aprelev

    I added Since and added entry to changelog.
    I'm not sure I understand how to share it since it needs to be part of this class.

    Nate Bosch

    Why does it need to be part of this class? Can all the "toStringVisiting" behavior, and it's static state, be moved to a shared library? The public APIs can be small forwarding implementations. Changing public API for implementation detail changes worries me.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Aprelev
    • Lasse Nielsen
    • Slava Egorov
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 26
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-CC: Nate Bosch <nbo...@google.com>
    Gerrit-Attention: Alexander Aprelev <a...@google.com>
    Gerrit-Attention: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Lasse Nielsen <l...@google.com>
    Gerrit-Comment-Date: Tue, 02 Dec 2025 23:48:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alexander Aprelev <a...@google.com>
    Comment-In-Reply-To: Lasse Nielsen <l...@google.com>
    unsatisfied_requirement
    blocking_requirement
    satisfied_requirement
    open
    diffy

    Alexander Aprelev (Gerrit)

    unread,
    Dec 2, 2025, 8:53:22 PM12/2/25
    to Alexander Aprelev, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Lasse Nielsen, Nate Bosch and Slava Egorov

    Alexander Aprelev added 1 comment

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . unresolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Alexander Aprelev

    I added Since and added entry to changelog.
    I'm not sure I understand how to share it since it needs to be part of this class.

    Nate Bosch

    Why does it need to be part of this class? Can all the "toStringVisiting" behavior, and it's static state, be moved to a shared library? The public APIs can be small forwarding implementations. Changing public API for implementation detail changes worries me.

    Alexander Aprelev

    Why does it need to be part of this class?

    For patching to work if I understand correctly patched methods needs to be part of some class. So previous public top-level-implementation(in internal.dart) won't work. This class already hosts recursive-friendly infrastructure for iterable toString operations, so it seems to be reasonable place to host map-specific toString operation as well.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lasse Nielsen
    • Nate Bosch
    • Slava Egorov
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 26
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-CC: Nate Bosch <nbo...@google.com>
    Gerrit-Attention: Nate Bosch <nbo...@google.com>
    Gerrit-Attention: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Lasse Nielsen <l...@google.com>
    Gerrit-Comment-Date: Wed, 03 Dec 2025 01:53:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Nate Bosch <nbo...@google.com>
    unsatisfied_requirement
    blocking_requirement
    satisfied_requirement
    open
    diffy

    Nate Bosch (Gerrit)

    unread,
    Dec 2, 2025, 9:43:14 PM12/2/25
    to Alexander Aprelev, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Alexander Aprelev, Lasse Nielsen and Slava Egorov

    Nate Bosch added 1 comment

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . resolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Alexander Aprelev

    I added Since and added entry to changelog.
    I'm not sure I understand how to share it since it needs to be part of this class.

    Nate Bosch

    Why does it need to be part of this class? Can all the "toStringVisiting" behavior, and it's static state, be moved to a shared library? The public APIs can be small forwarding implementations. Changing public API for implementation detail changes worries me.

    Alexander Aprelev

    Why does it need to be part of this class?

    For patching to work if I understand correctly patched methods needs to be part of some class. So previous public top-level-implementation(in internal.dart) won't work. This class already hosts recursive-friendly infrastructure for iterable toString operations, so it seems to be reasonable place to host map-specific toString operation as well.

    Nate Bosch

    Ah I didn't realize it was related to limitations in patching, I doubt I'll be able to find any alternatives to suggest in that case.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Aprelev
    • Lasse Nielsen
    • Slava Egorov
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 26
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-CC: Nate Bosch <nbo...@google.com>
    Gerrit-Attention: Alexander Aprelev <a...@google.com>
    Gerrit-Attention: Slava Egorov <veg...@google.com>
    Gerrit-Attention: Lasse Nielsen <l...@google.com>
    Gerrit-Comment-Date: Wed, 03 Dec 2025 02:43:10 +0000
    unsatisfied_requirement
    blocking_requirement
    satisfied_requirement
    open
    diffy

    Lasse Nielsen (Gerrit)

    unread,
    Dec 3, 2025, 10:41:06 AM12/3/25
    to Alexander Aprelev, Nate Bosch, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Alexander Aprelev and Slava Egorov

    Lasse Nielsen voted and added 2 comments

    Votes added by Lasse Nielsen

    Code-Review-1

    2 comments

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . unresolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Alexander Aprelev

    I added Since and added entry to changelog.
    I'm not sure I understand how to share it since it needs to be part of this class.

    Nate Bosch

    Why does it need to be part of this class? Can all the "toStringVisiting" behavior, and it's static state, be moved to a shared library? The public APIs can be small forwarding implementations. Changing public API for implementation detail changes worries me.

    Alexander Aprelev

    Why does it need to be part of this class?

    For patching to work if I understand correctly patched methods needs to be part of some class. So previous public top-level-implementation(in internal.dart) won't work. This class already hosts recursive-friendly infrastructure for iterable toString operations, so it seems to be reasonable place to host map-specific toString operation as well.

    Nate Bosch

    Ah I didn't realize it was related to limitations in patching, I doubt I'll be able to find any alternatives to suggest in that case.

    Lasse Nielsen

    I'd really prefer to just not have this method on `Iterable`. It doesn't belong there, maps are not iterables.

    Keep the function in `MapBase`, or move the implementation to `dart:internal` if you want to share it.

    If that's a problem with `_istoStringVisiting` and `_toStringVisiting`, move them all to `dart:_internal`. The two `*toStringVisiting` declarations can be public there.

    _(We really should have the core implementation in `dart:_core` which `dart:core` then exports *some* of. That would allow us to have public helpers in the same library, without exposing them to the world.)_

    Line 918, Patchset 26 (Latest): static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . unresolved

    Still think this shouldn't be in `Iterable`. Maps are not iterables, there is no reason for it to be *here*.

    Keep it in `MapBase`, and move `*toStringVisiting` to `dart:internal`
    so it can be used from both `dart:core` and `dart:collection`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Aprelev
    • Slava Egorov
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is blockingCode-Review
    • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
    Gerrit-Change-Number: 451841
    Gerrit-PatchSet: 26
    Gerrit-Owner: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
    Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
    Gerrit-Reviewer: Slava Egorov <veg...@google.com>
    Gerrit-CC: Nate Bosch <nbo...@google.com>
    Gerrit-Attention: Alexander Aprelev <a...@google.com>
    Gerrit-Attention: Slava Egorov <veg...@google.com>
    Gerrit-Comment-Date: Wed, 03 Dec 2025 15:41:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    blocking_requirement
    satisfied_requirement
    open
    diffy

    Alexander Aprelev (Gerrit)

    unread,
    Dec 3, 2025, 12:30:07 PM12/3/25
    to Alexander Aprelev, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
    Attention needed from Lasse Nielsen, Nate Bosch and Slava Egorov

    Alexander Aprelev voted and added 3 comments

    Votes added by Alexander Aprelev

    Commit-Queue+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 27 (Latest):
    Alexander Aprelev . resolved

    thank you Lasse for the suggestions.

    File sdk/lib/core/iterable.dart
    Line 917, Patchset 25: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . resolved

    This is a new public function.
    It used to be in `MapBase` and now it's in `Iterable`.

    If it's no longer in `MapBase`, that's a breaking change, so don't remove it.
    Also, it doesn't really belong in `Iterable`, maps are not `Iterable`, so why move it here?

    If it stays, it should have a `@Since("3.11")`, or whatever version it goes into, and be documented in the CHANGELOG.md.

    If you want to share it without needing to import `dart:collection`, then put it in `dart:_internal` and let `MapBase` reference it there.

    Alexander Aprelev

    I added Since and added entry to changelog.
    I'm not sure I understand how to share it since it needs to be part of this class.

    Nate Bosch

    Why does it need to be part of this class? Can all the "toStringVisiting" behavior, and it's static state, be moved to a shared library? The public APIs can be small forwarding implementations. Changing public API for implementation detail changes worries me.

    Alexander Aprelev

    Why does it need to be part of this class?

    For patching to work if I understand correctly patched methods needs to be part of some class. So previous public top-level-implementation(in internal.dart) won't work. This class already hosts recursive-friendly infrastructure for iterable toString operations, so it seems to be reasonable place to host map-specific toString operation as well.

    Nate Bosch

    Ah I didn't realize it was related to limitations in patching, I doubt I'll be able to find any alternatives to suggest in that case.

    Lasse Nielsen

    I'd really prefer to just not have this method on `Iterable`. It doesn't belong there, maps are not iterables.

    Keep the function in `MapBase`, or move the implementation to `dart:internal` if you want to share it.

    If that's a problem with `_istoStringVisiting` and `_toStringVisiting`, move them all to `dart:_internal`. The two `*toStringVisiting` declarations can be public there.

    _(We really should have the core implementation in `dart:_core` which `dart:core` then exports *some* of. That would allow us to have public helpers in the same library, without exposing them to the world.)_

    Alexander Aprelev

    Done

    Line 918, Patchset 26: static String mapToString(Map<Object?, Object?> m) {
    Lasse Nielsen . resolved

    Still think this shouldn't be in `Iterable`. Maps are not iterables, there is no reason for it to be *here*.

    Keep it in `MapBase`, and move `*toStringVisiting` to `dart:internal`
    so it can be used from both `dart:core` and `dart:collection`.

    Alexander Aprelev

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lasse Nielsen
    • Nate Bosch
    • Slava Egorov
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is blockingCode-Review
      • requirement satisfiedCommit-Message-Has-TEST
      • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
      Gerrit-Change-Number: 451841
      Gerrit-PatchSet: 27
      Gerrit-Owner: Alexander Aprelev <a...@google.com>
      Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
      Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
      Gerrit-Reviewer: Slava Egorov <veg...@google.com>
      Gerrit-CC: Nate Bosch <nbo...@google.com>
      Gerrit-Attention: Nate Bosch <nbo...@google.com>
      Gerrit-Attention: Slava Egorov <veg...@google.com>
      Gerrit-Attention: Lasse Nielsen <l...@google.com>
      Gerrit-Comment-Date: Wed, 03 Dec 2025 17:30:02 +0000
      unsatisfied_requirement
      blocking_requirement
      satisfied_requirement
      open
      diffy

      Lasse Nielsen (Gerrit)

      unread,
      Dec 4, 2025, 7:11:01 AM12/4/25
      to Alexander Aprelev, Nate Bosch, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
      Attention needed from Alexander Aprelev, Nate Bosch and Slava Egorov

      Lasse Nielsen voted and added 1 comment

      Votes added by Lasse Nielsen

      Code-Review+1

      1 comment

      Patchset-level comments
      Lasse Nielsen . resolved

      Much better 😊

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Aprelev
      • Nate Bosch
      • Slava Egorov
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 27
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-CC: Nate Bosch <nbo...@google.com>
        Gerrit-Attention: Nate Bosch <nbo...@google.com>
        Gerrit-Attention: Alexander Aprelev <a...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Comment-Date: Thu, 04 Dec 2025 12:10:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Alexander Aprelev (Gerrit)

        unread,
        Dec 5, 2025, 12:12:02 PM12/5/25
        to Alexander Aprelev, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Slava Egorov

        Alexander Aprelev added 1 comment

        Patchset-level comments
        Alexander Aprelev . resolved

        Slava, PTAL when you have a chance.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Slava Egorov
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 27
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-CC: Nate Bosch <nbo...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Comment-Date: Fri, 05 Dec 2025 17:11:58 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Alexander Aprelev (Gerrit)

        unread,
        Dec 10, 2025, 10:56:31 AM12/10/25
        to Alexander Aprelev, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Slava Egorov

        Alexander Aprelev added 1 comment

        Patchset-level comments
        Alexander Aprelev . resolved

        friendly ping

        Gerrit-Comment-Date: Wed, 10 Dec 2025 15:56:28 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Alexander Aprelev (Gerrit)

        unread,
        Dec 10, 2025, 12:34:26 PM12/10/25
        to Alexander Aprelev, Nate Biggs, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Nate Biggs and Slava Egorov

        Alexander Aprelev voted and added 1 comment

        Votes added by Alexander Aprelev

        Commit-Queue+1

        1 comment

        Patchset-level comments
        File-level comment, Patchset 28 (Latest):
        Alexander Aprelev . resolved

        Adding Nate for updates to dart2wasm test expectations

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Nate Biggs
        • Slava Egorov
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 28
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Nate Biggs <nate...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-CC: Nate Bosch <nbo...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Comment-Date: Wed, 10 Dec 2025 17:34:21 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Nate Bosch (Gerrit)

        unread,
        Dec 10, 2025, 7:58:06 PM12/10/25
        to Alexander Aprelev, Nate Biggs, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Alexander Aprelev, Nate Biggs and Slava Egorov

        Nate Bosch voted and added 1 comment

        Votes added by Nate Bosch

        Code-Review+1

        1 comment

        File tests/ffi/run_isolate_group_run_test.dart
        Line 443, Patchset 28 (Latest):///
        Nate Bosch . resolved

        [nit] Can we delete this? I see it's an existing pattern in this file, but I don't think it's a good pattern to keep.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alexander Aprelev
        • Nate Biggs
        • Slava Egorov
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 28
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Nate Biggs <nate...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Alexander Aprelev <a...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 00:58:03 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Alexander Aprelev (Gerrit)

        unread,
        Dec 11, 2025, 10:57:28 AM12/11/25
        to Alexander Aprelev, Nate Bosch, Nate Biggs, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Nate Biggs and Slava Egorov

        Alexander Aprelev added 2 comments

        Patchset-level comments
        Alexander Aprelev . resolved

        still looking for +1 from dart2wasm test owners.

        File tests/ffi/run_isolate_group_run_test.dart
        Nate Bosch . resolved

        [nit] Can we delete this? I see it's an existing pattern in this file, but I don't think it's a good pattern to keep.

        Alexander Aprelev

        Thanks Nate, I put them there to group top-levels variables with the top-level test methods they used in. Without any delimiters it felt it was hard to see the reason for top-level variables to be interleaved with the metods. Do you have a better suggestion?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Nate Biggs
        • Slava Egorov
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 28
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Nate Biggs <nate...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 15:57:25 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Nate Bosch <nbo...@google.com>
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Nate Biggs (Gerrit)

        unread,
        Dec 11, 2025, 11:05:37 AM12/11/25
        to Alexander Aprelev, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Alexander Aprelev and Slava Egorov

        Nate Biggs voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alexander Aprelev
        • Slava Egorov
        Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 28
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Nate Biggs <nate...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Alexander Aprelev <a...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 16:05:33 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Alexander Aprelev (Gerrit)

        unread,
        Dec 11, 2025, 12:32:27 PM12/11/25
        to Alexander Aprelev, Nate Biggs, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Slava Egorov

        Alexander Aprelev voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Slava Egorov
        Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 28
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Nate Biggs <nate...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-Attention: Slava Egorov <veg...@google.com>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 17:32:24 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Alexander Aprelev (Gerrit)

        unread,
        Dec 11, 2025, 12:32:41 PM12/11/25
        to Alexander Aprelev, Nate Biggs, Nate Bosch, Lasse Nielsen, Slava Egorov, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org
        Attention needed from Slava Egorov

        Alexander Aprelev added 1 comment

        Patchset-level comments
        Alexander Aprelev . resolved

        thank you Nate!

        Gerrit-Comment-Date: Thu, 11 Dec 2025 17:32:37 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy

        Commit Queue (Gerrit)

        unread,
        Dec 11, 2025, 12:32:45 PM12/11/25
        to Alexander Aprelev, Nate Biggs, Nate Bosch, Lasse Nielsen, Slava Egorov, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org

        Commit Queue submitted the change

        Change information

        Commit message:
        [vm/sdk] Use FinalThreadLocal for Iterable toString.

        This allows use of toString in isolategroup-bound callbacks.

        BUG=https://github.com/dart-lang/sdk/issues/61030.
        TEST=ci
        CoreLibraryReviewExempt: effectively vm-only change
        Change-Id: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/451841
        Reviewed-by: Nate Biggs <nate...@google.com>
        Commit-Queue: Alexander Aprelev <a...@google.com>
        Reviewed-by: Lasse Nielsen <l...@google.com>
        Reviewed-by: Nate Bosch <nbo...@google.com>
        Files:
        • M pkg/dart2wasm/test/ir_tests/dyn_closure.wat
        • M pkg/dart2wasm/test/ir_tests/dyn_closure_function_apply.wat
        • M pkg/dart2wasm/test/ir_tests/dyn_closure_function_apply_named.wat
        • M pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
        • M sdk/lib/_internal/js_dev_runtime/patch/internal_patch.dart
        • M sdk/lib/_internal/js_runtime/lib/internal_patch.dart
        • M sdk/lib/_internal/vm/lib/internal_patch.dart
        • M sdk/lib/_internal/wasm/lib/internal_patch.dart
        • M sdk/lib/collection/collection.dart
        • M sdk/lib/core/core.dart
        • M sdk/lib/internal/internal.dart
        • M tests/ffi/run_isolate_group_run_test.dart
        Change size: M
        Delta: 12 files changed, 51 insertions(+), 16 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Lasse Nielsen, +1 by Nate Biggs, +1 by Nate Bosch
        • requirement satisfiedCore-Library-Review: Code-Review+1 by Lasse Nielsen, Code-Review+1 by Nate Biggs, Code-Review+1 by Nate Bosch
        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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 29
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        open
        diffy
        satisfied_requirement

        Nate Bosch (Gerrit)

        unread,
        Dec 11, 2025, 6:24:41 PM12/11/25
        to Alexander Aprelev, Commit Queue, Nate Biggs, Lasse Nielsen, Slava Egorov, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org

        Nate Bosch added 1 comment

        File tests/ffi/run_isolate_group_run_test.dart
        Nate Bosch . resolved

        [nit] Can we delete this? I see it's an existing pattern in this file, but I don't think it's a good pattern to keep.

        Alexander Aprelev

        Thanks Nate, I put them there to group top-levels variables with the top-level test methods they used in. Without any delimiters it felt it was hard to see the reason for top-level variables to be interleaved with the metods. Do you have a better suggestion?

        Nate Bosch

        I think either `//` or blocking by only including blank lines between blocks are both slightly preferable to `///` which stands out as a blank doc to me, but the ROI on changing is not as high in that case so I'd also be fine leaving well enough alone.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • requirement satisfiedCore-Library-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: Iccdc218716cbbe2346aa85bb6134f4129debe057
        Gerrit-Change-Number: 451841
        Gerrit-PatchSet: 29
        Gerrit-Owner: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
        Gerrit-Reviewer: Lasse Nielsen <l...@google.com>
        Gerrit-Reviewer: Nate Biggs <nate...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-Reviewer: Slava Egorov <veg...@google.com>
        Gerrit-Comment-Date: Thu, 11 Dec 2025 23:24:38 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages