[M] Change in dart/sdk[main]: [dart2wasm] Explicitly model functions that do not return

0 views
Skip to first unread message

Srujan Gaddam (Gerrit)

unread,
Apr 30, 2026, 8:44:30 PM (13 days ago) Apr 30
to Martin Kustermann, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Martin Kustermann

Srujan Gaddam voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Martin Kustermann
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: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Gerrit-Change-Number: 499240
Gerrit-PatchSet: 7
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Martin Kustermann <kuste...@google.com>
Gerrit-Comment-Date: Fri, 01 May 2026 00:44:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Martin Kustermann (Gerrit)

unread,
May 12, 2026, 3:22:00 PM (18 hours ago) May 12
to Srujan Gaddam, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Srujan Gaddam

Martin Kustermann voted and added 1 comment

Votes added by Martin Kustermann

Commit-Queue+1

1 comment

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

PTAL: The previous failures were due to the change in `convertType` - but I pulled that change out to another CL (the base of this)

Open in Gerrit

Related details

Attention is currently required from:
  • Srujan Gaddam
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: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Gerrit-Change-Number: 499240
Gerrit-PatchSet: 15
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Srujan Gaddam <sru...@google.com>
Gerrit-Comment-Date: Tue, 12 May 2026 19:21:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Srujan Gaddam (Gerrit)

unread,
May 12, 2026, 8:33:19 PM (13 hours ago) May 12
to Martin Kustermann, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart2wasm-t...@google.com, rev...@dartlang.org
Attention needed from Martin Kustermann

Srujan Gaddam voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Martin Kustermann
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: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Gerrit-Change-Number: 499240
Gerrit-PatchSet: 15
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Martin Kustermann <kuste...@google.com>
Gerrit-Comment-Date: Wed, 13 May 2026 00:33:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Martin Kustermann (Gerrit)

unread,
3:23 AM (6 hours ago) 3:23 AM
to Srujan Gaddam, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart2wasm-t...@google.com, rev...@dartlang.org

Martin Kustermann voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
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: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Gerrit-Change-Number: 499240
Gerrit-PatchSet: 16
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Comment-Date: Wed, 13 May 2026 07:23:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
3:23 AM (6 hours ago) 3:23 AM
to Martin Kustermann, Srujan Gaddam, dart2wasm-t...@google.com, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

Unreviewed changes

15 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
[dart2wasm] Explicitly model functions that do not return

Similar to [0] which recognizes functions that return always nulls, we
recognize functions that never return and

* make the wasm function have no outputs
* make call sites emit `unreachable()` after the call (to inform
binaryen & wasm runtime that this is unreachable)

Before we had an artificial construct where we made such functions
have a `w.RefType(HeapType.none, nullable: false)` return type (i.e.
bottom, i.e. no values) and encoded that way it's unreachable.

We also change some exported wasm functions to explicitly use wasm
types in the signature (namely `WasmVoid` instead of Dart `void`).

[0] https://dart-review.googlesource.com/c/sdk/+/497620
Change-Id: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Commit-Queue: Martin Kustermann <kuste...@google.com>
Reviewed-by: Srujan Gaddam <sru...@google.com>
Files:
  • M pkg/dart2wasm/lib/code_generator.dart
  • M pkg/dart2wasm/lib/dispatch_table.dart
  • M pkg/dart2wasm/lib/functions.dart
  • M pkg/dart2wasm/lib/translator.dart
  • A pkg/dart2wasm/test/ir_tests/always_throws.dart
  • A pkg/dart2wasm/test/ir_tests/always_throws.wat
  • M pkg/dart2wasm/test/ir_tests/deferred.fine_grained_module3.wat
  • M pkg/dart2wasm/test/ir_tests/deferred.type_checks_module1.wat
  • M pkg/dart2wasm/test/ir_tests/dispatch_table_reuse_module1.wat
Change size: M
Delta: 9 files changed, 130 insertions(+), 21 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Srujan Gaddam
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: I3724e777cda23c0cf2c8a7dd2e473f3fef0a4f54
Gerrit-Change-Number: 499240
Gerrit-PatchSet: 17
Gerrit-Owner: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Martin Kustermann <kuste...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages