[wasmfx] Implement resume_throw [v8/v8 : main]

0 views
Skip to first unread message

Thibaud Michaud (Gerrit)

unread,
Jan 7, 2026, 9:48:13 AM (2 days ago) Jan 7
to V8 LUCI CQ, Clemens Backes, dmercadi...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, v8-re...@googlegroups.com, v8-risc...@chromium.org, was...@google.com
Attention needed from Clemens Backes

Thibaud Michaud added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Thibaud Michaud . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Clemens Backes
Submit Requirements:
  • requirement is not 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Gerrit-Change-Number: 7409666
Gerrit-PatchSet: 2
Gerrit-Owner: Thibaud Michaud <thib...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-Attention: Clemens Backes <clem...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 14:48:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Clemens Backes (Gerrit)

unread,
Jan 7, 2026, 11:24:30 AM (2 days ago) Jan 7
to Thibaud Michaud, V8 LUCI CQ, dmercadi...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, v8-re...@googlegroups.com, v8-risc...@chromium.org, was...@google.com
Attention needed from Thibaud Michaud

Clemens Backes voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Thibaud Michaud
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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Gerrit-Change-Number: 7409666
Gerrit-PatchSet: 2
Gerrit-Owner: Thibaud Michaud <thib...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 16:24:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Thibaud Michaud (Gerrit)

unread,
Jan 7, 2026, 11:26:05 AM (2 days ago) Jan 7
to Clemens Backes, V8 LUCI CQ, dmercadi...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, v8-re...@googlegroups.com, v8-risc...@chromium.org, was...@google.com

Thibaud Michaud 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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Gerrit-Change-Number: 7409666
Gerrit-PatchSet: 2
Gerrit-Owner: Thibaud Michaud <thib...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 16:26:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Jan 7, 2026, 12:33:06 PM (2 days ago) Jan 7
to Thibaud Michaud, Clemens Backes, dmercadi...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, v8-re...@googlegroups.com, v8-risc...@chromium.org, was...@google.com

V8 LUCI CQ submitted the change

Change information

Commit message:
[wasmfx] Implement resume_throw

The resume_throw instruction creates an exception using the current
stack's operands, resumes the target continuation and immediately throws
the exception from the top of that stack.
Like other stack switching instructions, this is implemented with a
builtin that saves the current register state and restores the target
state. But instead of restoring the saved PC, the builtin throws the
exception.
The builtin also handles the special case where the target continuation
was just created with cont.new and has not been started yet. The
corresponding stack is empty and should only be entered with the stack
entry wrapper. Do not switch in this case, and throw the exception from
the current stack instead which has the same observable behavior.

R=clem...@chromium.org
Bug: 388533754
Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Reviewed-by: Clemens Backes <clem...@chromium.org>
Commit-Queue: Thibaud Michaud <thib...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#104527}
Files:
  • M src/builtins/arm/builtins-arm.cc
  • M src/builtins/arm64/builtins-arm64.cc
  • M src/builtins/builtins-definitions.h
  • M src/builtins/ia32/builtins-ia32.cc
  • M src/builtins/wasm.tq
  • M src/builtins/x64/builtins-x64.cc
  • M src/codegen/interface-descriptors-inl.h
  • M src/codegen/interface-descriptors.h
  • M src/compiler/turboshaft/builtin-call-descriptors.h
  • M src/runtime/runtime-wasm.cc
  • M src/runtime/runtime.h
  • M src/wasm/baseline/liftoff-compiler.cc
  • M src/wasm/function-body-decoder-impl.h
  • M src/wasm/turboshaft-graph-interface.cc
  • M src/wasm/wasm-builtin-list.h
  • A test/mjsunit/wasm/resume-throw.js
Change size: L
Delta: 16 files changed, 384 insertions(+), 46 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Clemens Backes
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Gerrit-Change-Number: 7409666
Gerrit-PatchSet: 3
Gerrit-Owner: Thibaud Michaud <thib...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
open
diffy
satisfied_requirement

Yahan Lu (LuYahan) (Gerrit)

unread,
Jan 7, 2026, 11:48:31 PM (2 days ago) Jan 7
to Ji Qiu, v8-re...@googlegroups.com, v8-risc...@chromium.org
Attention needed from Ji Qiu

Yahan Lu (LuYahan) voted

Auto-Submit+1
Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Ji Qiu
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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I61b383c4c4166242b9d34ee142329788f25d25db
Gerrit-Change-Number: 7412876
Gerrit-PatchSet: 1
Gerrit-Owner: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Gerrit-Reviewer: Ji Qiu <qi...@iscas.ac.cn>
Gerrit-Reviewer: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Gerrit-Attention: Ji Qiu <qi...@iscas.ac.cn>
Gerrit-Comment-Date: Thu, 08 Jan 2026 04:48:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Ji Qiu (Gerrit)

unread,
Jan 8, 2026, 3:02:48 AM (yesterday) Jan 8
to Yahan Lu (LuYahan), V8 LUCI CQ, v8-re...@googlegroups.com, v8-risc...@chromium.org
Attention needed from Yahan Lu (LuYahan)

Ji Qiu voted

Code-Review+1
Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Yahan Lu (LuYahan)
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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I61b383c4c4166242b9d34ee142329788f25d25db
Gerrit-Change-Number: 7412876
Gerrit-PatchSet: 2
Gerrit-Owner: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Gerrit-Reviewer: Ji Qiu <qi...@iscas.ac.cn>
Gerrit-Reviewer: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Gerrit-Attention: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Gerrit-Comment-Date: Thu, 08 Jan 2026 08:02:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Jan 8, 2026, 3:04:18 AM (yesterday) Jan 8
to Yahan Lu (LuYahan), Ji Qiu, v8-re...@googlegroups.com, v8-risc...@chromium.org

V8 LUCI CQ submitted the change

Change information

Commit message:
[riscv] [wasmfx] Implement resume_throw

Port commit 4522793ec3278e1af5581adf8f4b8a255ada03ec

Bug: 388533754
Change-Id: I61b383c4c4166242b9d34ee142329788f25d25db
Auto-Submit: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Reviewed-by: Ji Qiu <qi...@iscas.ac.cn>
Commit-Queue: Ji Qiu <qi...@iscas.ac.cn>
Cr-Commit-Position: refs/heads/main@{#104537}
Files:
  • M src/builtins/riscv/builtins-riscv.cc
Change size: S
Delta: 1 file changed, 32 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Ji Qiu
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I61b383c4c4166242b9d34ee142329788f25d25db
Gerrit-Change-Number: 7412876
Gerrit-PatchSet: 3
Gerrit-Owner: Yahan Lu (LuYahan) <ya...@iscas.ac.cn>
Gerrit-Reviewer: Ji Qiu <qi...@iscas.ac.cn>
open
diffy
satisfied_requirement

Liu Yu (Gerrit)

unread,
Jan 8, 2026, 3:15:12 AM (yesterday) Jan 8
to Zhao Jiazhong, v8-loongar...@chromium.org, v8-re...@googlegroups.com
Attention needed from Zhao Jiazhong

Liu Yu voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Zhao Jiazhong
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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I60067a4d11c49a3366b98ca80acfa7adb923d5f4
Gerrit-Change-Number: 7414779
Gerrit-PatchSet: 1
Gerrit-Owner: Liu Yu <li...@loongson.cn>
Gerrit-Reviewer: Liu Yu <li...@loongson.cn>
Gerrit-Reviewer: Zhao Jiazhong <zhaojia...@loongson.cn>
Gerrit-Attention: Zhao Jiazhong <zhaojia...@loongson.cn>
Gerrit-Comment-Date: Thu, 08 Jan 2026 08:15:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
Jan 8, 2026, 3:42:04 AM (yesterday) Jan 8
to Thibaud Michaud, V8 LUCI CQ, Clemens Backes, dmercadi...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, v8-re...@googlegroups.com, v8-risc...@chromium.org, was...@google.com
Attention needed from Thibaud Michaud

Darius Mercadier added 1 comment

File src/compiler/turboshaft/builtin-call-descriptors.h
Line 1740, Patchset 3 (Latest): struct WasmFXResumeThrow : public Descriptor<WasmFXResumeThrow> {
static constexpr auto kFunction = Builtin::kWasmFXResumeThrow;
// Target stack, tag, exception array and instance.
using arguments_t = std::tuple<V<WordPtr>, V<WasmTagObject>, V<FixedArray>,
V<WasmTrustedInstanceData>>;
// Return values buffer.
using results_t = std::tuple<V<WordPtr>>;

static constexpr bool kNeedsFrameState = false;
static constexpr bool kNeedsContext = false;
static constexpr Operator::Properties kProperties = Operator::kNoProperties;
static constexpr OpEffects kEffects = base_effects.CanCallAnything();
};
Darius Mercadier . unresolved

Try to use the "new" descriptors when possible (cf earlier in this file, the ones that use the ARG macro)

Open in Gerrit

Related details

Attention is currently required from:
  • Thibaud Michaud
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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Gerrit-Change-Number: 7409666
Gerrit-PatchSet: 3
Gerrit-Owner: Thibaud Michaud <thib...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 08:41:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Zhao Jiazhong (Gerrit)

unread,
Jan 8, 2026, 3:44:08 AM (yesterday) Jan 8
to Liu Yu, v8-loongar...@chromium.org, v8-re...@googlegroups.com
Attention needed from Liu Yu

Zhao Jiazhong voted and added 1 comment

Votes added by Zhao Jiazhong

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Zhao Jiazhong . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Liu Yu
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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I60067a4d11c49a3366b98ca80acfa7adb923d5f4
Gerrit-Change-Number: 7414779
Gerrit-PatchSet: 1
Gerrit-Owner: Liu Yu <li...@loongson.cn>
Gerrit-Reviewer: Liu Yu <li...@loongson.cn>
Gerrit-Reviewer: Zhao Jiazhong <zhaojia...@loongson.cn>
Gerrit-Attention: Liu Yu <li...@loongson.cn>
Gerrit-Comment-Date: Thu, 08 Jan 2026 08:44:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Jan 8, 2026, 4:29:09 AM (yesterday) Jan 8
to Liu Yu, Zhao Jiazhong, v8-loongar...@chromium.org, v8-re...@googlegroups.com

V8 LUCI CQ submitted the change

Change information

Commit message:
[loong64][wasmfx] Implement resume_throw

Port commit 4522793ec3278e1af5581adf8f4b8a255ada03ec
Bug: 388533754
Change-Id: I60067a4d11c49a3366b98ca80acfa7adb923d5f4
Reviewed-by: Zhao Jiazhong <zhaojia...@loongson.cn>
Auto-Submit: Liu Yu <li...@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojia...@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#104541}
Files:
  • M src/builtins/loong64/builtins-loong64.cc
  • M src/builtins/mips64/builtins-mips64.cc
Change size: S
Delta: 2 files changed, 34 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Zhao Jiazhong
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I60067a4d11c49a3366b98ca80acfa7adb923d5f4
Gerrit-Change-Number: 7414779
Gerrit-PatchSet: 2
Gerrit-Owner: Liu Yu <li...@loongson.cn>
Gerrit-Reviewer: Liu Yu <li...@loongson.cn>
Gerrit-Reviewer: Zhao Jiazhong <zhaojia...@loongson.cn>
open
diffy
satisfied_requirement

Thibaud Michaud (Gerrit)

unread,
Jan 8, 2026, 9:56:42 AM (20 hours ago) Jan 8
to V8 LUCI CQ, Darius Mercadier, Clemens Backes, dmercadi...@chromium.org, v8-mip...@googlegroups.com, v8-ppc...@googlegroups.com, v8-re...@googlegroups.com, v8-risc...@chromium.org, was...@google.com

Thibaud Michaud added 1 comment

File src/compiler/turboshaft/builtin-call-descriptors.h
Line 1740, Patchset 3 (Latest): struct WasmFXResumeThrow : public Descriptor<WasmFXResumeThrow> {
static constexpr auto kFunction = Builtin::kWasmFXResumeThrow;
// Target stack, tag, exception array and instance.
using arguments_t = std::tuple<V<WordPtr>, V<WasmTagObject>, V<FixedArray>,
V<WasmTrustedInstanceData>>;
// Return values buffer.
using results_t = std::tuple<V<WordPtr>>;

static constexpr bool kNeedsFrameState = false;
static constexpr bool kNeedsContext = false;
static constexpr Operator::Properties kProperties = Operator::kNoProperties;
static constexpr OpEffects kEffects = base_effects.CanCallAnything();
};
Darius Mercadier . unresolved

Try to use the "new" descriptors when possible (cf earlier in this file, the ones that use the ARG macro)

Thibaud Michaud

I gave it a quick try for this new descriptor, but I'm hitting a compilation error because we build the call using `CallBuiltinThroughJumptable()` (in src/wasm/turboshaft-graph-interface.cc) which relies on the old format. The problem is that this helper function is used by other wasm builtins, so it's starting to look simpler to migrate all the wasm descriptors in a separate change.

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: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Iadbb54c9c3e1759d3e63e1b1aad5435250acffee
Gerrit-Change-Number: 7409666
Gerrit-PatchSet: 3
Gerrit-Owner: Thibaud Michaud <thib...@chromium.org>
Gerrit-Reviewer: Clemens Backes <clem...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 14:56:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages