[XS] Change in dart/sdk[main]: [dart2wasm] Use == instead of identical for when converting value types

1 view
Skip to first unread message

Ömer Ağacan (Gerrit)

unread,
May 29, 2025, 8:15:54 AMMay 29
to Nate Biggs, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Nate Biggs

Ömer Ağacan added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Ömer Ağacan . unresolved

@nate...@google.com I wasn't sure why we want `identical` here instead of `==`. I would expect that if I have `ref MyStruct` on both sides we should avoid conversion, even though the types may not be identical. Changing this to `==` does not break any tests. Is there a reason why we want `identical` instead of `==`?

Open in Gerrit

Related details

Attention is currently required from:
  • Nate Biggs
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I93a9ba42d34a3b0cd1b9d7966ad45d3c4e745809
Gerrit-Change-Number: 431880
Gerrit-PatchSet: 1
Gerrit-Owner: Ömer Ağacan <ome...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Thu, 29 May 2025 12:15:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Nate Biggs (Gerrit)

unread,
May 29, 2025, 1:10:47 PMMay 29
to Ömer Ağacan, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Ömer Ağacan

Nate Biggs added 1 comment

Patchset-level comments
Ömer Ağacan . unresolved

@nate...@google.com I wasn't sure why we want `identical` here instead of `==`. I would expect that if I have `ref MyStruct` on both sides we should avoid conversion, even though the types may not be identical. Changing this to `==` does not break any tests. Is there a reason why we want `identical` instead of `==`?

Nate Biggs

`identical` was meant as a quick, cheap short-circuit. I realized that the `isSubtypeOf` check below ends up doing the same equality checks. So in the many cases where the types aren't `==` we end up doing the kind of slow `==` check twice. When they are `==` we don't save much work by doing that full check here.

Open in Gerrit

Related details

Attention is currently required from:
  • Ömer Ağacan
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I93a9ba42d34a3b0cd1b9d7966ad45d3c4e745809
Gerrit-Change-Number: 431880
Gerrit-PatchSet: 1
Gerrit-Owner: Ömer Ağacan <ome...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Attention: Ömer Ağacan <ome...@google.com>
Gerrit-Comment-Date: Thu, 29 May 2025 17:10:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ömer Ağacan <ome...@google.com>
unsatisfied_requirement
open
diffy

Ömer Ağacan (Gerrit)

unread,
Dec 22, 2025, 7:37:35 AM (3 days ago) Dec 22
to Nate Biggs, dart2wasm-t...@google.com, rev...@dartlang.org

Ömer Ağacan abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages