[XL] Change in dart/sdk[main]: [dart2js] Migrate resource identifiers output to record use

0 views
Skip to first unread message

Johnni Winther (Gerrit)

unread,
Nov 12, 2025, 5:17:32 AMNov 12
to Moritz Sümmermann, Daco Harkes, Mayank Patke, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Daco Harkes, Mayank Patke, Moritz Sümmermann and Nate Biggs

Johnni Winther voted and added 1 comment

Votes added by Johnni Winther

Code-Review+1

1 comment

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

front_end change LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Daco Harkes
  • Mayank Patke
  • Moritz Sümmermann
  • Nate Biggs
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
Gerrit-Change-Number: 416000
Gerrit-PatchSet: 29
Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Attention: Mayank Patke <fishyt...@google.com>
Gerrit-Comment-Date: Wed, 12 Nov 2025 10:17:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Mayank Patke (Gerrit)

unread,
Nov 12, 2025, 6:11:26 PMNov 12
to Moritz Sümmermann, Daco Harkes, Nate Bosch, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Daco Harkes, Moritz Sümmermann, Nate Biggs and Nate Bosch

Mayank Patke voted and added 5 comments

Votes added by Mayank Patke

Code-Review+1

5 comments

Patchset-level comments
File-level comment, Patchset 30 (Latest):
Mayank Patke . resolved

pkg/compiler LGTM modulo nits

File pkg/compiler/lib/src/common/names.dart
Line 310, Patchset 30 (Latest): /// The URI for 'package:meta/dart2js.dart'.
Mayank Patke . unresolved
```suggestion
/// The URI for 'package:meta/meta.dart'.
```
File pkg/compiler/lib/src/ir/annotations.dart
Line 198, Patchset 30 (Latest): Iterable<PragmaAnnotationData> pragmaAnnotation = _getPragmaAnnotation(
Mayank Patke . unresolved

This should be named differently if it's now a collection. Or consider inlining it below.

Line 385, Patchset 30 (Latest):Iterable<PragmaAnnotationData> _getPragmaAnnotation(ir.Constant constant) {
Mayank Patke . unresolved

This ought to be renamed too.

Line 386, Patchset 30 (Latest): if (constant is! ir.InstanceConstant) return [];
Mayank Patke . unresolved

Let's use `const` return values here and below to avoid the extra allocations.

Open in Gerrit

Related details

Attention is currently required from:
  • Daco Harkes
  • Moritz Sümmermann
  • Nate Biggs
  • Nate Bosch
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
Gerrit-Change-Number: 416000
Gerrit-PatchSet: 30
Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-Attention: Nate Bosch <nbo...@google.com>
Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Wed, 12 Nov 2025 23:11:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Nate Bosch (Gerrit)

unread,
Nov 12, 2025, 8:07:41 PMNov 12
to Moritz Sümmermann, Daco Harkes, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Daco Harkes, Moritz Sümmermann and Nate Biggs

Nate Bosch voted and added 8 comments

Votes added by Nate Bosch

Code-Review+1

8 comments

File pkg/compiler/lib/src/ir/annotations.dart
Line 385, Patchset 30 (Latest):Iterable<PragmaAnnotationData> _getPragmaAnnotation(ir.Constant constant) {
Mayank Patke . unresolved

This ought to be renamed too.

Nate Bosch

+1 to rename while we're touching call sites anyway.

https://dart.dev/effective-dart/design#avoid-starting-a-method-name-with-get

File pkg/compiler/lib/src/js_emitter/resource_info_emitter.dart
Line 90, Patchset 30 (Latest): Map<Identifier, List<CallReference>> callMap = {};
//TODO(mosum): Also register the part file of the definition.
Map<Identifier, String> loadingUnits = {};
Nate Bosch . unresolved

Can these be `final`?

Line 98, Patchset 30 (Latest): /// Save an [resourceIdentifier] in the [callMap].
Nate Bosch . unresolved

[nit]

```suggestion
/// Save a [resourceIdentifier] in the [callMap].
```
Line 105, Patchset 30 (Latest): (callMap[identifier] ??= []).add(
Nate Bosch . unresolved

[nit] The `??=` version can do two lookups, would `putIfAbsent` be better?

```suggestion
callMap.putIfAbsent(identifier, () => []).add(
```
File pkg/compiler/lib/src/ssa/codegen.dart
Line 2432, Patchset 30 (Latest): final List<Constant?> constantArguments = [];
for (final constant in arguments.map(_findConstant)) {
constantArguments.add(constant != null ? _findValue(constant) : null);
}
Nate Bosch . unresolved

[optional]

```suggestion
final constantArguments = [
for (final argument in arguments.map(_findConstant))
if (_findConstant(argument) case final constant?) _findValue(constant),
];
```
File pkg/compiler/test/record_use/record_use_test.dart
Line 14, Patchset 30 (Latest):/// Add in options to pass to the compiler like
Line 42, Patchset 30 (Latest): print('Test file: ${testFile.uri}');
Nate Bosch . unresolved

Should we remove this?

File pkg/record_use/test_data/drop_data_asset/hook/link.dart
Line 40, Patchset 30 (Latest): 'A call was made to "$methodName" with the arguments (${call.positional[0] as int},${call.positional[1] as int})',
Nate Bosch . unresolved

[nit] manually split to 80 characters

Open in Gerrit

Related details

Attention is currently required from:
  • Daco Harkes
  • Moritz Sümmermann
  • Nate Biggs
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
Gerrit-Change-Number: 416000
Gerrit-PatchSet: 30
Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Thu, 13 Nov 2025 01:07:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Moritz Sümmermann (Gerrit)

unread,
Nov 13, 2025, 3:31:04 AMNov 13
to Daco Harkes, Nate Bosch, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Daco Harkes and Nate Biggs

Moritz Sümmermann voted and added 1 comment

Votes added by Moritz Sümmermann

Code-Review+1

1 comment

Patchset-level comments
Moritz Sümmermann . resolved

+1 for pkg/vm and pkg/record_use!

Open in Gerrit

Related details

Attention is currently required from:
  • Daco Harkes
  • Nate Biggs
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
Gerrit-Change-Number: 416000
Gerrit-PatchSet: 30
Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Thu, 13 Nov 2025 08:30:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Daco Harkes (Gerrit)

unread,
Nov 14, 2025, 5:37:57 AMNov 14
to Moritz Sümmermann, Nate Bosch, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther, Mayank Patke, Moritz Sümmermann, Nate Biggs and Nate Bosch

Daco Harkes added 13 comments

Patchset-level comments
File-level comment, Patchset 31 (Latest):
Daco Harkes . resolved

Thanks everyone!

Gerrit is strict on not carrying forward +1s for addressing nits. Another round of +1s please 🤓

Commit Message
Line 11, Patchset 23:(Internal) customers will have to migrated.
Daco Harkes . resolved

You can clone the failing g3 cl, migrate the customers and port the require changes to a separate g3 cl, and attach that CL to the cbuild. That should make it green here. (We cannot land this Gerrit CL without that.)

Nate Biggs

+1

More generally, this is technically a breaking change. I'm not sure if anyone is using this feature on the web outside of internal users but we should still call it out in the CHANGELOG.

Daco Harkes

I am taking over this CL. I have a WIP in cl/830421816, with one failing test which is the one single integration test of the use in g3. Hopefully I can get it working tomorrow.

Daco Harkes

Done

File pkg/compiler/lib/src/common/names.dart
Line 310, Patchset 30: /// The URI for 'package:meta/dart2js.dart'.
Mayank Patke . resolved
```suggestion
/// The URI for 'package:meta/meta.dart'.
```
Daco Harkes

Done

File pkg/compiler/lib/src/ir/annotations.dart
Line 198, Patchset 30: Iterable<PragmaAnnotationData> pragmaAnnotation = _getPragmaAnnotation(
Mayank Patke . resolved

This should be named differently if it's now a collection. Or consider inlining it below.

Daco Harkes

Done

Line 385, Patchset 30:Iterable<PragmaAnnotationData> _getPragmaAnnotation(ir.Constant constant) {
Mayank Patke . resolved

This ought to be renamed too.

Nate Bosch

+1 to rename while we're touching call sites anyway.

https://dart.dev/effective-dart/design#avoid-starting-a-method-name-with-get

Daco Harkes

Done

Line 386, Patchset 30: if (constant is! ir.InstanceConstant) return [];
Mayank Patke . resolved

Let's use `const` return values here and below to avoid the extra allocations.

Daco Harkes

Done

File pkg/compiler/lib/src/js_emitter/resource_info_emitter.dart
Line 90, Patchset 30: Map<Identifier, List<CallReference>> callMap = {};

//TODO(mosum): Also register the part file of the definition.
Map<Identifier, String> loadingUnits = {};
Nate Bosch . resolved

Can these be `final`?

Daco Harkes

Done

Line 98, Patchset 30: /// Save an [resourceIdentifier] in the [callMap].
Nate Bosch . resolved

[nit]

```suggestion
/// Save a [resourceIdentifier] in the [callMap].
```
Daco Harkes

Done

Line 105, Patchset 30: (callMap[identifier] ??= []).add(
Nate Bosch . resolved

[nit] The `??=` version can do two lookups, would `putIfAbsent` be better?

```suggestion
callMap.putIfAbsent(identifier, () => []).add(
```
Daco Harkes

Done

File pkg/compiler/lib/src/ssa/codegen.dart
Line 2432, Patchset 30: final List<Constant?> constantArguments = [];

for (final constant in arguments.map(_findConstant)) {
constantArguments.add(constant != null ? _findValue(constant) : null);
}
Nate Bosch . resolved

[optional]

```suggestion
final constantArguments = [
for (final argument in arguments.map(_findConstant))
if (_findConstant(argument) case final constant?) _findValue(constant),
];
```
Daco Harkes

I find that harder to read (and the nullability is off, we need an extra null check).

File pkg/compiler/test/record_use/record_use_test.dart
Line 14, Patchset 30:/// Add in options to pass to the compiler like
Nate Bosch . resolved
Daco Harkes

Done

Line 42, Patchset 30: print('Test file: ${testFile.uri}');
Nate Bosch . resolved

Should we remove this?

Daco Harkes

Done

File pkg/record_use/test_data/drop_data_asset/hook/link.dart
Line 40, Patchset 30: 'A call was made to "$methodName" with the arguments (${call.positional[0] as int},${call.positional[1] as int})',
Nate Bosch . resolved

[nit] manually split to 80 characters

Daco Harkes

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Mayank Patke
  • Moritz Sümmermann
  • Nate Biggs
  • Nate Bosch
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement satisfiedCommit-Message-Has-TEST
      • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
      Gerrit-Change-Number: 416000
      Gerrit-PatchSet: 31
      Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
      Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
      Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
      Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
      Gerrit-CC: Alexander Markov <alexm...@google.com>
      Gerrit-CC: Nate Biggs <nate...@google.com>
      Gerrit-Attention: Nate Bosch <nbo...@google.com>
      Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
      Gerrit-Attention: Mayank Patke <fishyt...@google.com>
      Gerrit-Attention: Nate Biggs <nate...@google.com>
      Gerrit-Attention: Johnni Winther <johnni...@google.com>
      Gerrit-Comment-Date: Fri, 14 Nov 2025 10:37:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Nate Bosch <nbo...@google.com>
      Comment-In-Reply-To: Daco Harkes <dacoh...@google.com>
      Comment-In-Reply-To: Nate Biggs <nate...@google.com>
      Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Daco Harkes (Gerrit)

      unread,
      Nov 14, 2025, 7:44:50 AMNov 14
      to Moritz Sümmermann, Liam Appelbe, Nate Bosch, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
      Attention needed from Johnni Winther, Liam Appelbe, Mayank Patke, Moritz Sümmermann, Nate Biggs and Nate Bosch

      Daco Harkes added 1 comment

      Patchset-level comments
      Daco Harkes . resolved

      +Liam for approval of package/vm testcase.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Johnni Winther
      • Liam Appelbe
      • Mayank Patke
      • Moritz Sümmermann
      • Nate Biggs
      • Nate Bosch
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement satisfiedCommit-Message-Has-TEST
      • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
      Gerrit-Change-Number: 416000
      Gerrit-PatchSet: 31
      Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
      Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
      Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
      Gerrit-Reviewer: Liam Appelbe <li...@google.com>
      Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
      Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
      Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
      Gerrit-CC: Alexander Markov <alexm...@google.com>
      Gerrit-CC: Nate Biggs <nate...@google.com>
      Gerrit-Attention: Nate Bosch <nbo...@google.com>
      Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
      Gerrit-Attention: Liam Appelbe <li...@google.com>
      Gerrit-Attention: Mayank Patke <fishyt...@google.com>
      Gerrit-Attention: Nate Biggs <nate...@google.com>
      Gerrit-Attention: Johnni Winther <johnni...@google.com>
      Gerrit-Comment-Date: Fri, 14 Nov 2025 12:44:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Moritz Sümmermann (Gerrit)

      unread,
      Nov 14, 2025, 10:45:52 AMNov 14
      to Daco Harkes, Liam Appelbe, Nate Bosch, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
      Attention needed from Daco Harkes, Johnni Winther, Liam Appelbe, Mayank Patke, Nate Biggs and Nate Bosch

      Moritz Sümmermann voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Daco Harkes
      • Johnni Winther
      • Liam Appelbe
      • Mayank Patke
      • Nate Biggs
      • Nate Bosch
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
        Gerrit-Change-Number: 416000
        Gerrit-PatchSet: 31
        Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
        Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
        Gerrit-Reviewer: Liam Appelbe <li...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-CC: Alexander Markov <alexm...@google.com>
        Gerrit-CC: Nate Biggs <nate...@google.com>
        Gerrit-Attention: Nate Bosch <nbo...@google.com>
        Gerrit-Attention: Liam Appelbe <li...@google.com>
        Gerrit-Attention: Daco Harkes <dacoh...@google.com>
        Gerrit-Attention: Mayank Patke <fishyt...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Attention: Johnni Winther <johnni...@google.com>
        Gerrit-Comment-Date: Fri, 14 Nov 2025 15:45:45 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Nate Bosch (Gerrit)

        unread,
        Nov 14, 2025, 4:42:50 PMNov 14
        to Moritz Sümmermann, Daco Harkes, Liam Appelbe, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
        Attention needed from Daco Harkes, Johnni Winther, Liam Appelbe, Mayank Patke, Moritz Sümmermann and Nate Biggs

        Nate Bosch voted and added 1 comment

        Votes added by Nate Bosch

        Code-Review+1

        1 comment

        File pkg/compiler/lib/src/ssa/codegen.dart
        Line 2432, Patchset 30: final List<Constant?> constantArguments = [];
        for (final constant in arguments.map(_findConstant)) {
        constantArguments.add(constant != null ? _findValue(constant) : null);
        }
        Nate Bosch . resolved

        [optional]

        ```suggestion
        final constantArguments = [
        for (final argument in arguments.map(_findConstant))
        if (_findConstant(argument) case final constant?) _findValue(constant),
        ];
        ```
        Daco Harkes

        I find that harder to read (and the nullability is off, we need an extra null check).

        Nate Bosch

        and the nullability is off, we need an extra null check

        I don't see where the behavior is different. The `constant != null?` from your version translates to the `?` in `final constant?` in my version. I don't have an `else null` branch on my conditional because it let's us skip the `nonNulls` later.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daco Harkes
        • Johnni Winther
        • Liam Appelbe
        • Mayank Patke
        • Moritz Sümmermann
        • Nate Biggs
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
        Gerrit-Change-Number: 416000
        Gerrit-PatchSet: 31
        Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
        Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
        Gerrit-Reviewer: Liam Appelbe <li...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-CC: Alexander Markov <alexm...@google.com>
        Gerrit-CC: Nate Biggs <nate...@google.com>
        Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
        Gerrit-Attention: Liam Appelbe <li...@google.com>
        Gerrit-Attention: Daco Harkes <dacoh...@google.com>
        Gerrit-Attention: Mayank Patke <fishyt...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Attention: Johnni Winther <johnni...@google.com>
        Gerrit-Comment-Date: Fri, 14 Nov 2025 21:42:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Liam Appelbe (Gerrit)

        unread,
        Nov 16, 2025, 6:53:08 PMNov 16
        to Moritz Sümmermann, Daco Harkes, Liam Appelbe, Nate Bosch, Mayank Patke, Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
        Attention needed from Daco Harkes, Johnni Winther, Mayank Patke, Moritz Sümmermann and Nate Biggs

        Liam Appelbe voted and added 1 comment

        Votes added by Liam Appelbe

        Code-Review+1

        1 comment

        Patchset-level comments
        Liam Appelbe . resolved

        pkg/vm changes LGTM

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daco Harkes
        • Johnni Winther
        Gerrit-Attention: Daco Harkes <dacoh...@google.com>
        Gerrit-Attention: Mayank Patke <fishyt...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Attention: Johnni Winther <johnni...@google.com>
        Gerrit-Comment-Date: Sun, 16 Nov 2025 23:53:01 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Johnni Winther (Gerrit)

        unread,
        Nov 17, 2025, 3:53:04 AMNov 17
        to Moritz Sümmermann, Daco Harkes, Liam Appelbe, Nate Bosch, Mayank Patke, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
        Attention needed from Daco Harkes, Mayank Patke, Moritz Sümmermann and Nate Biggs

        Johnni Winther voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daco Harkes
        Gerrit-Comment-Date: Mon, 17 Nov 2025 08:52:57 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Mayank Patke (Gerrit)

        unread,
        Nov 17, 2025, 6:06:42 PMNov 17
        to Moritz Sümmermann, Daco Harkes, Johnni Winther, Liam Appelbe, Nate Bosch, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
        Attention needed from Daco Harkes, Moritz Sümmermann and Nate Biggs

        Mayank Patke voted and added 2 comments

        Votes added by Mayank Patke

        Code-Review+1

        2 comments

        Patchset-level comments
        Mayank Patke . resolved

        pkg/compiler LGTM

        File pkg/compiler/lib/src/ir/annotations.dart
        Line 428, Patchset 31 (Latest): return [];
        Mayank Patke . unresolved
        ```suggestion
        return const [];
        ```
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daco Harkes
        • Moritz Sümmermann
        • Nate Biggs
        Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
        Gerrit-Change-Number: 416000
        Gerrit-PatchSet: 31
        Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
        Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
        Gerrit-Reviewer: Liam Appelbe <li...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-CC: Alexander Markov <alexm...@google.com>
        Gerrit-CC: Nate Biggs <nate...@google.com>
        Gerrit-Attention: Moritz Sümmermann <mo...@google.com>
        Gerrit-Attention: Daco Harkes <dacoh...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Comment-Date: Mon, 17 Nov 2025 23:06:38 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Daco Harkes (Gerrit)

        unread,
        Nov 18, 2025, 3:30:31 AMNov 18
        to Moritz Sümmermann, Mayank Patke, Johnni Winther, Liam Appelbe, Nate Bosch, Nate Biggs, Commit Queue, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org
        Attention needed from Mayank Patke, Moritz Sümmermann and Nate Biggs

        Daco Harkes voted and added 1 comment

        Votes added by Daco Harkes

        Commit-Queue+2

        1 comment

        File pkg/compiler/lib/src/ir/annotations.dart
        Mayank Patke . unresolved
        ```suggestion
        return const [];
        ```
        Daco Harkes

        I'm going to do this in a separate CL to not lose the +1s again.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Mayank Patke
        • Moritz Sümmermann
        • Nate Biggs
        Gerrit-Attention: Mayank Patke <fishyt...@google.com>
        Gerrit-Attention: Nate Biggs <nate...@google.com>
        Gerrit-Comment-Date: Tue, 18 Nov 2025 08:30:25 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
        satisfied_requirement
        open
        diffy

        Commit Queue (Gerrit)

        unread,
        Nov 18, 2025, 3:53:31 AMNov 18
        to Moritz Sümmermann, Daco Harkes, Mayank Patke, Johnni Winther, Liam Appelbe, Nate Bosch, Nate Biggs, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org

        Commit Queue submitted the change

        Change information

        Commit message:
        [dart2js] Migrate resource identifiers output to record use

        First step into making both dart2js and the vm output the same
        for recorded uses.

        This CL changes the output format to be the same.

        It does not
        - change the annotations which are read,
        - add support for named arguments,
        - add support for const source locations, and
        - test feature parity.

        Bug: https://github.com/dart-lang/native/issues/2717

        Internal customers are migrated in cl/830421816.

        TEST=pkg/dartdev/test/native_assets/compile_test.dart
        Change-Id: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
        Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try,dart2js-canary-linux-try,dart2js-hostasserts-linux-d8-try,dart2js-linux-chrome-try,dart2js-linux-firefox-try,dart2js-mac-chrome-try,dart2js-mac-safari-try,dart2js-minified-csp-linux-chrome-try,dart2js-minified-linux-d8-try,dart2js-unit-linux-x64-release-try,dart2js-win-chrome-try,dart2wasm-linux-jscm-chrome-try,dart2wasm-linux-optimized-jsc-try
        Reviewed-by: Johnni Winther <johnni...@google.com>
        Reviewed-by: Mayank Patke <fishyt...@google.com>
        Reviewed-by: Moritz Sümmermann <mo...@google.com>
        Reviewed-by: Nate Bosch <nbo...@google.com>
        Commit-Queue: Daco Harkes <dacoh...@google.com>
        Reviewed-by: Liam Appelbe <li...@google.com>
        Files:
        • M pkg/compiler/lib/src/common/codegen.dart
        • M pkg/compiler/lib/src/common/names.dart
        • M pkg/compiler/lib/src/ir/annotations.dart
        • M pkg/compiler/lib/src/js_emitter/resource_info_emitter.dart
        • M pkg/compiler/lib/src/ssa/codegen.dart
        • M pkg/compiler/lib/src/universe/resource_identifier.dart
        • M pkg/compiler/pubspec.yaml
        • M pkg/compiler/test/equivalence/id_equivalence_helper.dart
        • A pkg/compiler/test/record_use/data/basic.dart
        • A pkg/compiler/test/record_use/golden/basic.json.expect
        • A pkg/compiler/test/record_use/golden/complex.json.expect
        • A pkg/compiler/test/record_use/golden/different.json.expect
        • A pkg/compiler/test/record_use/golden/extension.json.expect
        • A pkg/compiler/test/record_use/golden/instance_class.json.expect
        • A pkg/compiler/test/record_use/golden/instance_complex.json.expect
        • A pkg/compiler/test/record_use/golden/instance_duplicates.json.expect
        • A pkg/compiler/test/record_use/golden/instance_method.json.expect
        • A pkg/compiler/test/record_use/golden/instance_not_annotation.json.expect
        • A pkg/compiler/test/record_use/golden/loading_units_multiple.json.expect
        • A pkg/compiler/test/record_use/golden/loading_units_simple.json.expect
        • A pkg/compiler/test/record_use/golden/named_and_positional.json.expect
        • A pkg/compiler/test/record_use/golden/named_both.json.expect
        • A pkg/compiler/test/record_use/golden/named_optional.json.expect
        • A pkg/compiler/test/record_use/golden/named_required.json.expect
        • A pkg/compiler/test/record_use/golden/nested.json.expect
        • A pkg/compiler/test/record_use/golden/partfile_main.json.expect
        • A pkg/compiler/test/record_use/golden/positional_both.json.expect
        • A pkg/compiler/test/record_use/golden/positional_optional.json.expect
        • A pkg/compiler/test/record_use/golden/record_enum.json.expect
        • A pkg/compiler/test/record_use/golden/record_instance_constant_empty.json.expect
        • A pkg/compiler/test/record_use/golden/simple.json.expect
        • A pkg/compiler/test/record_use/golden/tearoff.json.expect
        • A pkg/compiler/test/record_use/golden/top_level_method.json.expect
        • A pkg/compiler/test/record_use/golden/types_of_arguments.json.expect
        • A pkg/compiler/test/record_use/record_use_test.dart
        • M pkg/dartdev/test/native_assets/compile_test.dart
        • M pkg/dartdev/test/native_assets/helpers.dart
        • M pkg/front_end/lib/src/source/source_loader.dart
        • M pkg/record_use/lib/record_use_internal.dart
        • M pkg/record_use/lib/src/recordings.dart
        • M pkg/record_use/lib/src/reference.dart
        • A pkg/record_use/lib/src/version.dart
        • A pkg/record_use/test_data/drop_data_asset/.gitignore
        • A pkg/record_use/test_data/drop_data_asset/README.md
        • A pkg/record_use/test_data/drop_data_asset/assets/add.txt
        • A pkg/record_use/test_data/drop_data_asset/assets/double.txt
        • A pkg/record_use/test_data/drop_data_asset/assets/multiply.txt
        • A pkg/record_use/test_data/drop_data_asset/assets/square.txt
        • A pkg/record_use/test_data/drop_data_asset/bin/drop_data_asset_calls.dart
        • A pkg/record_use/test_data/drop_data_asset/bin/drop_data_asset_instances.dart
        • A pkg/record_use/test_data/drop_data_asset/hook/build.dart
        • A pkg/record_use/test_data/drop_data_asset/hook/link.dart
        • A pkg/record_use/test_data/drop_data_asset/lib/drop_data_asset.dart
        • A pkg/record_use/test_data/drop_data_asset/lib/src/drop_data_asset.dart
        • A pkg/record_use/test_data/drop_data_asset/pubspec.yaml
        • M pkg/record_use/test_data/drop_dylib_recording/hook/link.dart
        • M pkg/record_use/test_data/drop_dylib_recording/lib/src/drop_dylib_recording_bindings.dart
        • M pkg/record_use/test_data/manifest.yaml
        • M pkg/vm/lib/transformations/record_use/record_use.dart
        • M pkg/vm/pubspec.yaml
        • M pkg/vm/testcases/transformations/record_use/complex.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/different.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/extension.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/instance_class.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/instance_complex.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/instance_duplicates.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/instance_method.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/instance_not_annotation.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/loading_units_multiple.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/loading_units_simple.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/named_and_positional.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/named_both.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/named_optional.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/named_required.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/named_with_function_arg.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/nested.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/partfile_main.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/positional_both.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/positional_optional.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/record_enum.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/record_instance_constant.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/record_instance_constant_empty.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/simple.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/tearoff.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/top_level_method.dart.json.expect
        • M pkg/vm/testcases/transformations/record_use/types_of_arguments.dart.json.expect
        Change size: XL
        Delta: 86 files changed, 2074 insertions(+), 358 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Mayank Patke, +1 by Moritz Sümmermann, +1 by Johnni Winther, +1 by Nate Bosch, +1 by Liam Appelbe
        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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
        Gerrit-Change-Number: 416000
        Gerrit-PatchSet: 32
        Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
        Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
        Gerrit-Reviewer: Liam Appelbe <li...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-CC: Alexander Markov <alexm...@google.com>
        Gerrit-CC: Nate Biggs <nate...@google.com>
        open
        diffy
        satisfied_requirement

        Daco Harkes (Gerrit)

        unread,
        Dec 23, 2025, 9:05:36 AM (yesterday) Dec 23
        to Moritz Sümmermann, Commit Queue, Mayank Patke, Johnni Winther, Liam Appelbe, Nate Bosch, Nate Biggs, Alexander Markov, dart2js-te...@google.com, rev...@dartlang.org

        Daco Harkes added 1 comment

        File pkg/compiler/lib/src/ir/annotations.dart
        Line 428, Patchset 31: return [];
        Mayank Patke . resolved
        ```suggestion
        return const [];
        ```
        Daco Harkes

        I'm going to do this in a separate CL to not lose the +1s again.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedCommit-Message-Has-TEST
        • 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: I67b5e3d4aebac6c22b185c77f5cb69025d746a32
        Gerrit-Change-Number: 416000
        Gerrit-PatchSet: 32
        Gerrit-Owner: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
        Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
        Gerrit-Reviewer: Liam Appelbe <li...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Moritz Sümmermann <mo...@google.com>
        Gerrit-Reviewer: Nate Bosch <nbo...@google.com>
        Gerrit-CC: Alexander Markov <alexm...@google.com>
        Gerrit-CC: Nate Biggs <nate...@google.com>
        Gerrit-Comment-Date: Tue, 23 Dec 2025 14:05:31 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Daco Harkes <dacoh...@google.com>
        Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages