[L] Change in dart/sdk[main]: [record_use] Record kinds and disambiguators

0 views
Skip to first unread message

Daco Harkes (Gerrit)

unread,
9:54 AM (12 hours ago) 9:54 AM
to Nate Biggs, Commit Queue, Alexander Markov, dart-fe-te...@google.com, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Nate Biggs

Daco Harkes voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Nate Biggs
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: I7f87fcac3d2333b150cc7ed30bce7960f8a845e3
Gerrit-Change-Number: 481100
Gerrit-PatchSet: 11
Gerrit-Owner: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Tue, 17 Feb 2026 14:54:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Daco Harkes (Gerrit)

unread,
10:04 AM (12 hours ago) 10:04 AM
to Johnni Winther, Nate Biggs, Commit Queue, Alexander Markov, dart-fe-te...@google.com, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther and Nate Biggs

Daco Harkes added 1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
  • Nate Biggs
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: I7f87fcac3d2333b150cc7ed30bce7960f8a845e3
Gerrit-Change-Number: 481100
Gerrit-PatchSet: 11
Gerrit-Owner: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Tue, 17 Feb 2026 15:03:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Nate Biggs (Gerrit)

unread,
11:45 AM (10 hours ago) 11:45 AM
to Daco Harkes, Johnni Winther, Commit Queue, Alexander Markov, dart-fe-te...@google.com, dart2js-te...@google.com, rev...@dartlang.org
Attention needed from Daco Harkes and Johnni Winther

Nate Biggs added 4 comments

File pkg/compiler/lib/src/js_emitter/record_use_emitter.dart
Line 88, Patchset 11 (Latest): Definition _getDefinition(Entity entity, String? metadata) {
Nate Biggs . unresolved

This code is very difficult to read.
(1) Can you add a comment describing the format of the `metadata` String input?
(2) Can we do something a little more type-safe than a `|` separated String? As is this feels very error prone.

Line 94, Patchset 11 (Latest): final parts = metadata.split('|');
Nate Biggs . unresolved

Why use `|` as a separator? What about something like a static extension name that already has a `|` in it?

File pkg/front_end/lib/src/kernel/record_use.dart
Line 128, Patchset 11 (Latest):/// desugaring or lowering (like extension methods).
Nate Biggs . unresolved

I feel like this would ideally be handled by a shared `Visitor` that collects the information and then each backend can call it and access the collected information directly on that Visitor.

Or if that doesn't work then using a [MetadataRepository](https://github.com/dart-lang/sdk/blob/d5647cb755ef58ffd1f572438447dee013f84ea0/pkg/kernel/lib/src/ast/components.dart#L323) to attach metadata to the relevant nodes.

As mentioned above, IMO this annotation is holding too much information in a String blob and either of those options should allow you to do something more type-safe.

File pkg/vm/lib/transformations/type_flow/transformer.dart
Line 350, Patchset 11 (Latest): constant.value.startsWith('record-use:definition:')) {
Nate Biggs . unresolved

Avoid magic strings.

Open in Gerrit

Related details

Attention is currently required from:
  • Daco Harkes
  • Johnni Winther
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: I7f87fcac3d2333b150cc7ed30bce7960f8a845e3
Gerrit-Change-Number: 481100
Gerrit-PatchSet: 11
Gerrit-Owner: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Daco Harkes <dacoh...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-CC: Alexander Markov <alexm...@google.com>
Gerrit-Attention: Daco Harkes <dacoh...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Tue, 17 Feb 2026 16:45:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages