[S] Change in dart/sdk[main]: [dart2wasm] Make imported globals/functions have nicer name

0 views
Skip to first unread message

Martin Kustermann (Gerrit)

unread,
Oct 31, 2025, 8:15:59 AM (19 hours ago) Oct 31
to Ömer Ağacan, Nate Biggs, Commit Queue, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Nate Biggs and Ömer Ağacan

Martin Kustermann added 1 comment

File pkg/dart2wasm/test/ir_tests/deferred.constant_module2.wat
Line 34, Patchset 2 (Latest): (func $"globalH0Foo tear-off dynamic call entry" (param $var0 (ref $#ClosureBase)) (param $var1 (ref $Array<_Type>)) (param $var2 (ref $Array<Object?>)) (param $var3 (ref $Array<Object?>)) (result (ref null $#Top))
Martin Kustermann . unresolved

These changes here are actually due to different CL (whose CI checks didn't run dart2wasm unfortunately - since it only touches `pkg/dartdev`): https://dart-review.googlesource.com/c/sdk/+/458720

Open in Gerrit

Related details

Attention is currently required from:
  • Nate Biggs
  • Ömer Ağacan
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I770233f5e7c5d08050e8189402e7294b88212651
Gerrit-Change-Number: 458840
Gerrit-PatchSet: 2
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 12:15:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ömer Ağacan (Gerrit)

unread,
Oct 31, 2025, 8:20:23 AM (19 hours ago) Oct 31
to Martin Kustermann, Nate Biggs, Commit Queue, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Martin Kustermann and Nate Biggs

Ömer Ağacan voted and added 2 comments

Votes added by Ömer Ağacan

Code-Review+1

2 comments

Commit Message
Line 13, Patchset 2 (Latest): defining one.
Ömer Ağacan . unresolved

Will this not cause name collisions sometimes?

File pkg/dart2wasm/lib/translator.dart
Line 2812, Patchset 2 (Latest): function.functionName = function.functionName;
Ömer Ağacan . unresolved

This should be `function.functionName = definition.functionName`.

So it looks like this is not tested. Might be good to test if not too difficult.

Open in Gerrit

Related details

Attention is currently required from:
  • Martin Kustermann
  • Nate Biggs
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I770233f5e7c5d08050e8189402e7294b88212651
Gerrit-Change-Number: 458840
Gerrit-PatchSet: 2
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Martin Kustermann <kuste...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 12:20:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Martin Kustermann (Gerrit)

unread,
Oct 31, 2025, 8:35:24 AM (18 hours ago) Oct 31
to Ömer Ağacan, Nate Biggs, Commit Queue, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Nate Biggs and Ömer Ağacan

Martin Kustermann added 3 comments

Commit Message
Line 13, Patchset 2: defining one.
Ömer Ağacan . unresolved

Will this not cause name collisions sometimes?

Martin Kustermann

There can always be name collisions - e.g. two identically named functions in two different libraries that get bundled in the same module will probably have the same name.

Though these collisions don't cause any problem per-se - modulo readability of wat files.

This particular change I think will not cause any more collisions than that there are already because if a function/global is imported then it does exist in a different module so the local module doesn't define it's own (instead it imports it).

I could prefix the names with `(imported) <definedFunction.functionName>' but that just makes it longer.

File pkg/dart2wasm/lib/translator.dart
Line 2812, Patchset 2: function.functionName = function.functionName;
Ömer Ağacan . resolved

This should be `function.functionName = definition.functionName`.

So it looks like this is not tested. Might be good to test if not too difficult.

Martin Kustermann

Thanks. Added a test.

(Have been not sleeping too well lately ...)

File pkg/dart2wasm/test/ir_tests/deferred.constant_module2.wat
Line 34, Patchset 2: (func $"globalH0Foo tear-off dynamic call entry" (param $var0 (ref $#ClosureBase)) (param $var1 (ref $Array<_Type>)) (param $var2 (ref $Array<Object?>)) (param $var3 (ref $Array<Object?>)) (result (ref null $#Top))
Martin Kustermann . resolved

These changes here are actually due to different CL (whose CI checks didn't run dart2wasm unfortunately - since it only touches `pkg/dartdev`): https://dart-review.googlesource.com/c/sdk/+/458720

Martin Kustermann

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Nate Biggs
  • Ömer Ağacan
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I770233f5e7c5d08050e8189402e7294b88212651
Gerrit-Change-Number: 458840
Gerrit-PatchSet: 3
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 12:35:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ömer Ağacan <ome...@google.com>
Comment-In-Reply-To: Martin Kustermann <kuste...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Martin Kustermann (Gerrit)

unread,
Oct 31, 2025, 9:34:33 AM (17 hours ago) Oct 31
to Ömer Ağacan, Nate Biggs, Commit Queue, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Nate Biggs and Ömer Ağacan

Martin Kustermann voted and added 1 comment

Votes added by Martin Kustermann

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Martin Kustermann . resolved

Landing it now to get the failing builder green again.

Open in Gerrit

Related details

Attention is currently required from:
  • Nate Biggs
  • Ömer Ağacan
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I770233f5e7c5d08050e8189402e7294b88212651
Gerrit-Change-Number: 458840
Gerrit-PatchSet: 3
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 13:34:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Martin Kustermann (Gerrit)

unread,
Oct 31, 2025, 9:35:08 AM (17 hours ago) Oct 31
to Ömer Ağacan, Nate Biggs, Commit Queue, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Martin Kustermann, Nate Biggs and Ömer Ağacan

Martin Kustermann voted and added 1 comment

Votes added by Martin Kustermann

Commit-Queue+2

1 comment

Patchset-level comments
Martin Kustermann . unresolved

Landing it now to get the failing builder green again.

Martin Kustermann

Ah, it needs a +1 again.

Open in Gerrit

Related details

Attention is currently required from:
  • Martin Kustermann
  • Nate Biggs
  • Ömer Ağacan
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I770233f5e7c5d08050e8189402e7294b88212651
Gerrit-Change-Number: 458840
Gerrit-PatchSet: 3
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Nate Biggs <nate...@google.com>
Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Ömer Ağacan <ome...@google.com>
Gerrit-Attention: Martin Kustermann <kuste...@google.com>
Gerrit-Attention: Nate Biggs <nate...@google.com>
Gerrit-Comment-Date: Fri, 31 Oct 2025 13:35:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Martin Kustermann <kuste...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages