Implement switch instruction. [v8/v8 : main]

0 views
Skip to first unread message

Francis McCabe (Gerrit)

unread,
Mar 16, 2026, 12:06:44 PMMar 16
to Jakob Linke, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Deepti Gandluri and Thibaud Michaud

Francis McCabe removed Jakob Linke from this change

Deleted Reviewers:
  • Jakob Linke
Open in Gerrit

Related details

Attention is currently required from:
  • Deepti Gandluri
  • Thibaud Michaud
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: deleteReviewer
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I8d626bd36ac21c554d494aa8c3f3525ded914a64
Gerrit-Change-Number: 7597327
Gerrit-PatchSet: 26
Gerrit-Owner: Francis McCabe <f...@chromium.org>
Gerrit-Reviewer: Deepti Gandluri <gde...@chromium.org>
Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
Gerrit-Attention: Deepti Gandluri <gde...@chromium.org>
unsatisfied_requirement
open
diffy

Francis McCabe (Gerrit)

unread,
Mar 16, 2026, 12:07:41 PMMar 16
to Nico Hartmann, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Nico Hartmann and Thibaud Michaud

Francis McCabe added 1 comment

Patchset-level comments
File-level comment, Patchset 26 (Latest):
Francis McCabe . resolved

This is a large-ish CL. However, the largest part is actually test files.

Open in Gerrit

Related details

Attention is currently required from:
  • Nico Hartmann
  • Thibaud Michaud
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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
Gerrit-Change-Number: 7597327
Gerrit-PatchSet: 26
Gerrit-Owner: Francis McCabe <f...@chromium.org>
Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Mar 2026 16:07:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Darius Mercadier (Gerrit)

unread,
Mar 17, 2026, 4:21:28 AM (14 days ago) Mar 17
to Francis McCabe, Jakob Kummerow, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Francis McCabe, Jakob Kummerow and Thibaud Michaud

Darius Mercadier added 7 comments

Patchset-level comments
Darius Mercadier . resolved

Just a few small comments as I was passing by ;)

Commit Message
Line 7, Patchset 26 (Latest):Implement switch instruction.
Darius Mercadier . unresolved

nit: add a tag (`[wasm]`? `[wasmfx]`?)

Line 8, Patchset 26 (Latest):
Darius Mercadier . unresolved

nit: can you maybe add a link to the spec of to whatever documentation explains what this switch instruction is?

File src/wasm/turboshaft-graph-interface.cc
Line 3916, Patchset 26 (Latest): OpIndex loaded = this->Asm().LoadOffHeap(
Darius Mercadier . unresolved

Use a `V<>` type if possible.

Line 3916, Patchset 26 (Latest): OpIndex loaded = this->Asm().LoadOffHeap(
Darius Mercadier . unresolved

I don't particularly like this variable name; any chance you can make it describe a bit better what it contains?
(same thing later in this file)

Line 4046, Patchset 26 (Latest): this->Asm().StoreOffHeap(arg_buffer, args[index].op,
Darius Mercadier . unresolved

Doesn't `__` work?

Line 4050, Patchset 26 (Latest): this->Asm().StoreOffHeap(
Darius Mercadier . unresolved

same

Open in Gerrit

Related details

Attention is currently required from:
  • Francis McCabe
  • Jakob Kummerow
  • Thibaud Michaud
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
    Gerrit-Change-Number: 7597327
    Gerrit-PatchSet: 26
    Gerrit-Owner: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
    Gerrit-Attention: Francis McCabe <f...@chromium.org>
    Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Tue, 17 Mar 2026 08:21:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Francis McCabe (Gerrit)

    unread,
    Mar 17, 2026, 5:36:24 PM (13 days ago) Mar 17
    to Darius Mercadier, Jakob Kummerow, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Darius Mercadier, Jakob Kummerow and Thibaud Michaud

    Francis McCabe added 6 comments

    Commit Message
    Line 7, Patchset 26:Implement switch instruction.
    Darius Mercadier . resolved

    nit: add a tag (`[wasm]`? `[wasmfx]`?)

    Francis McCabe

    Acknowledged

    Line 8, Patchset 26:
    Darius Mercadier . resolved

    nit: can you maybe add a link to the spec of to whatever documentation explains what this switch instruction is?

    Francis McCabe

    Acknowledged

    File src/wasm/turboshaft-graph-interface.cc
    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . unresolved

    I don't particularly like this variable name; any chance you can make it describe a bit better what it contains?
    (same thing later in this file)

    Francis McCabe

    Agreed. Slightly better name: ith_return.

    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . unresolved

    Use a `V<>` type if possible.

    Francis McCabe

    This is not done anywhere else for OpIndex values.

    Line 4046, Patchset 26: this->Asm().StoreOffHeap(arg_buffer, args[index].op,
    Darius Mercadier . resolved

    Doesn't `__` work?

    Francis McCabe

    Unfortunately not. This code is in a lambda. __ XX expands to Asm().XX where we need this->Asm().XX.

    Line 4050, Patchset 26: this->Asm().StoreOffHeap(
    Darius Mercadier . resolved

    same

    Francis McCabe

    See above.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Darius Mercadier
    • Jakob Kummerow
    • Thibaud Michaud
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
    Gerrit-Change-Number: 7597327
    Gerrit-PatchSet: 29
    Gerrit-Owner: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
    Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Tue, 17 Mar 2026 21:36:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Darius Mercadier (Gerrit)

    unread,
    Mar 18, 2026, 2:14:03 AM (13 days ago) Mar 18
    to Francis McCabe, Jakob Kummerow, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Francis McCabe, Jakob Kummerow and Thibaud Michaud

    Darius Mercadier added 2 comments

    File src/wasm/turboshaft-graph-interface.cc
    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . unresolved

    Use a `V<>` type if possible.

    Francis McCabe

    This is not done anywhere else for OpIndex values.

    Darius Mercadier

    This file is full of `V<>` types. In fact, `OpIndex` appears around 200 times and `V<>` appears 700 times!

    If this specific OpIndex is hard express as `V<>`, that's ok, but please consider doing it. At least `V<Any>` looks like it should work. If the value is guaranteed to be tagged or untagged, you can use `V<Object>` or `V<Untagged>`.

    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . resolved

    I don't particularly like this variable name; any chance you can make it describe a bit better what it contains?
    (same thing later in this file)

    Francis McCabe

    Agreed. Slightly better name: ith_return.

    Darius Mercadier

    lgtm thanks :)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Francis McCabe
    • Jakob Kummerow
    • Thibaud Michaud
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
    Gerrit-Change-Number: 7597327
    Gerrit-PatchSet: 29
    Gerrit-Owner: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
    Gerrit-Attention: Francis McCabe <f...@chromium.org>
    Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Mar 2026 06:13:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
    Comment-In-Reply-To: Francis McCabe <f...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Thibaud Michaud (Gerrit)

    unread,
    Mar 18, 2026, 8:09:16 AM (13 days ago) Mar 18
    to Francis McCabe, Darius Mercadier, Jakob Kummerow, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Francis McCabe and Jakob Kummerow

    Thibaud Michaud added 7 comments

    File src/execution/isolate.cc
    Line 6044, Patchset 29 (Latest): memset(stack->jmpbuf(), 0, sizeof(wasm::JumpBuffer));
    stack->jmpbuf()->state = wasm::JumpBuffer::Active;
    stack->jmpbuf()->stack_limit = stack->jslimit();
    stack->jmpbuf()->parent = nullptr;
    stack->jmpbuf()->is_on_central_stack = true;
    Thibaud Michaud . unresolved

    Why is this needed?
    The jump buffer of the active stack is usually considered to be garbage since the SP, FP, etc. are currently changing. The jump buffer is initialized when we switch to a different stack.
    Same thing for the central stack pointers below. They should only be needed after having switched stacks, at which point they should have already been initialized.

    File src/wasm/turboshaft-graph-interface.cc
    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . unresolved

    Use a `V<>` type if possible.

    Francis McCabe

    This is not done anywhere else for OpIndex values.

    Darius Mercadier

    This file is full of `V<>` types. In fact, `OpIndex` appears around 200 times and `V<>` appears 700 times!

    If this specific OpIndex is hard express as `V<>`, that's ok, but please consider doing it. At least `V<Any>` looks like it should work. If the value is guaranteed to be tagged or untagged, you can use `V<Object>` or `V<Untagged>`.

    Thibaud Michaud

    I think it will have to be `Any` at best. The type depends on the `return_types` vector, so to have a more precise `V<>` we would have to do a switch on the `return_types[index]`, where each case does the same load but with a `V<>` that matches the wasm type.
    It's not worth it, especially since we just end up assigning it to `returns[index].op` which is an `OpIndex`.

    Line 4063, Patchset 29 (Latest): sig->parameters()[sig->parameters().size() - 1].ref_index());
    Thibaud Michaud . unresolved
    ```suggestion
    sig->parameters().last().ref_index());
    ```
    Line 4102, Patchset 29 (Latest): V<WasmContinuationObject> allocateContinuation(FullDecoder* decoder) {
    Thibaud Michaud . unresolved
    ```suggestion
    V<WasmContinuationObject> AllocateContinuation(FullDecoder* decoder) {
    ```
    Line 4141, Patchset 29 (Latest): // The external pointer is initialized in the {suspend_wasmfx_stack} C call.
    Thibaud Michaud . unresolved

    Obsolete comment.

    File src/wasm/wasm-external-refs.cc
    Line 1124, Patchset 29 (Latest): if (!to) return kNullAddress;
    Thibaud Michaud . unresolved

    I think we prefer to spell it out as `to == nullptr`.

    Line 1147, Patchset 29 (Latest): if (v8_flags.trace_wasm_stack_switching) {
    PrintF("Switch from stack %d to %d\n", from->id(), target_stack->id());
    }
    Thibaud Michaud . unresolved

    Can you move this after the early return? I would prefer to only print this if we did find a handler and performed the switch.
    In fact you can merge it with the other trace below, where you print the handler stack.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Francis McCabe
    • Jakob Kummerow
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
    Gerrit-Change-Number: 7597327
    Gerrit-PatchSet: 29
    Gerrit-Owner: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Francis McCabe <f...@chromium.org>
    Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Mar 2026 12:09:11 +0000
    unsatisfied_requirement
    open
    diffy

    Darius Mercadier (Gerrit)

    unread,
    Mar 18, 2026, 8:41:39 AM (13 days ago) Mar 18
    to Francis McCabe, Jakob Kummerow, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Francis McCabe and Jakob Kummerow

    Darius Mercadier added 1 comment

    File src/wasm/turboshaft-graph-interface.cc
    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . unresolved

    Use a `V<>` type if possible.

    Francis McCabe

    This is not done anywhere else for OpIndex values.

    Darius Mercadier

    This file is full of `V<>` types. In fact, `OpIndex` appears around 200 times and `V<>` appears 700 times!

    If this specific OpIndex is hard express as `V<>`, that's ok, but please consider doing it. At least `V<Any>` looks like it should work. If the value is guaranteed to be tagged or untagged, you can use `V<Object>` or `V<Untagged>`.

    Thibaud Michaud

    I think it will have to be `Any` at best. The type depends on the `return_types` vector, so to have a more precise `V<>` we would have to do a switch on the `return_types[index]`, where each case does the same load but with a `V<>` that matches the wasm type.
    It's not worth it, especially since we just end up assigning it to `returns[index].op` which is an `OpIndex`.

    Darius Mercadier

    I'd argue that `V<Any>` is better than `OpIndex`, because `OpIndex` is implicitely convertible to any `V<>` but `V<Any>` isn't. Currently the value is immediatly passed to AnnotateResultIfReference so it doesn't make a difference, but if AnnotateResultIfReference was for instance ever updated with wrong assumptions on its input type (encoded via a proper `V<>` input rather than its current `OpIndex`), then we'd get a compile error with `V<Any>` and not with `OpIndex`.

    Gerrit-Comment-Date: Wed, 18 Mar 2026 12:41:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
    Comment-In-Reply-To: Thibaud Michaud <thib...@chromium.org>
    Comment-In-Reply-To: Francis McCabe <f...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Thibaud Michaud (Gerrit)

    unread,
    Mar 18, 2026, 9:08:54 AM (13 days ago) Mar 18
    to Francis McCabe, Darius Mercadier, Jakob Kummerow, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Francis McCabe and Jakob Kummerow

    Thibaud Michaud added 1 comment

    File src/wasm/turboshaft-graph-interface.cc
    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . unresolved

    Use a `V<>` type if possible.

    Francis McCabe

    This is not done anywhere else for OpIndex values.

    Darius Mercadier

    This file is full of `V<>` types. In fact, `OpIndex` appears around 200 times and `V<>` appears 700 times!

    If this specific OpIndex is hard express as `V<>`, that's ok, but please consider doing it. At least `V<Any>` looks like it should work. If the value is guaranteed to be tagged or untagged, you can use `V<Object>` or `V<Untagged>`.

    Thibaud Michaud

    I think it will have to be `Any` at best. The type depends on the `return_types` vector, so to have a more precise `V<>` we would have to do a switch on the `return_types[index]`, where each case does the same load but with a `V<>` that matches the wasm type.
    It's not worth it, especially since we just end up assigning it to `returns[index].op` which is an `OpIndex`.

    Darius Mercadier

    I'd argue that `V<Any>` is better than `OpIndex`, because `OpIndex` is implicitely convertible to any `V<>` but `V<Any>` isn't. Currently the value is immediatly passed to AnnotateResultIfReference so it doesn't make a difference, but if AnnotateResultIfReference was for instance ever updated with wrong assumptions on its input type (encoded via a proper `V<>` input rather than its current `OpIndex`), then we'd get a compile error with `V<Any>` and not with `OpIndex`.

    Thibaud Michaud

    Right, I'm only arguing that assigning something more precise than `Any` would require splitting the load into multiple cases and does not seem worth it. But `V<Any>` sgtm.

    Gerrit-Comment-Date: Wed, 18 Mar 2026 13:08:51 +0000
    unsatisfied_requirement
    open
    diffy

    Jakob Kummerow (Gerrit)

    unread,
    Mar 18, 2026, 2:08:47 PM (12 days ago) Mar 18
    to Francis McCabe, Darius Mercadier, Jakob Kummerow, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Francis McCabe

    Jakob Kummerow added 15 comments

    File src/builtins/arm64/builtins-arm64.cc
    Line 4049, Patchset 29 (Latest): __ Mov(x8, arg_buffer_reg);
    arg_buffer_reg = x8;
    Jakob Kummerow . unresolved

    Can't you just do `__ Mov(kCArgRegs[7], arg_buffer_reg)` up front?

    File src/wasm/turboshaft-graph-interface.cc
    Line 3880, Patchset 29 (Latest): this->Asm().StoreOffHeap(
    Jakob Kummerow . unresolved

    While you're here: `__ `

    Line 3916, Patchset 29 (Latest): OpIndex ith_return = this->Asm().LoadOffHeap(
    Jakob Kummerow . unresolved

    `__ `

    Line 3919, Patchset 29 (Parent): __ LoadOffHeap(result_buffer, offset,
    Jakob Kummerow . unresolved

    As you can see here, `__` works just fine inside a lambda. Please keep using it, also in the new code.

    Line 3938, Patchset 29 (Latest): this->Asm().StoreOffHeap(arg_buffer, args[index].op,
    Jakob Kummerow . unresolved

    `__ `

    Line 3964, Patchset 29 (Latest): OpIndex loaded = this->Asm().LoadOffHeap(
    Jakob Kummerow . unresolved

    `__ `

    Line 4024, Patchset 29 (Latest): IF (is_on_central_stack) {
    __ WasmCallRuntime(__ phase_zone(), Runtime::kThrowWasmFXSuspendError, {},
    Jakob Kummerow . unresolved

    Any reason this isn't a `__ TrapIf(...)` call?

    Line 4046, Patchset 29 (Latest): this->Asm().StoreOffHeap(arg_buffer, args[index].op,
    Jakob Kummerow . unresolved

    `__ `, again below

    Line 4081, Patchset 29 (Latest): __ WordPtrConstant(reinterpret_cast<uintptr_t>(return_csig))},
    Jakob Kummerow . unresolved

    Embedding a pointer constant makes this code uncacheable, but we cache and re-use optimized code across processes. You'll have to embed type index instead; we have relocation support canonical type indices via `__ RelocatableWasmCanonicalSignatureId(sig_index);` (or you can embed the module-specific signature index, but then you'll need to pass the `WasmTrustedInstanceData` along to the C++ function to be able to resolve it to a canonical index).

    Line 4168, Patchset 29 (Latest): __ WordPtrConstant(reinterpret_cast<uintptr_t>(csig))},
    Jakob Kummerow . unresolved

    Same problem here. This needs to be fixed.

    File src/wasm/wasm-external-refs.cc
    Line 1116, Patchset 29 (Latest): const CanonicalSig* sig) {
    Jakob Kummerow . unresolved

    Matching my comment in the graph builder: both here and in `switch_...` below, you'll have to take the signature index.

    File test/mjsunit/wasm/stack-switching-switch-loop.js
    Line 17, Patchset 29 (Latest): let sig_coro_idx = builder.types.length;
    Jakob Kummerow . unresolved

    `nextTypeIndex()`.

    And the preferred pattern is to use that only once, e.g.:
    ```
    let type2 = builder.nextTypeIndex() + 1;
    let type1 = builder.addType(..., type2, ...);
    /* type2 */ builder.addCont(type1);
    ```

    Line 23, Patchset 29 (Latest): let tag_switch = builder.addTag(makeSig([], [kWasmI32]));
    Jakob Kummerow . unresolved

    `kSig_i_v` is predefined

    File test/mjsunit/wasm/stack-switching-switch.js
    Line 18, Patchset 29 (Latest): .addBody([kExprLocalGet, 0, kExprDrop]).exportFunc();
    Jakob Kummerow . unresolved

    Technically, for a "nop" function, you could also use `kExprNop`, or just an empty body. (You still need to call `.addBody([])` though in order to get the required `kExprEnd`.)

    Line 21, Patchset 29 (Latest): .addLocals(wasmRefType(cont_v_c), 1)
    Jakob Kummerow . unresolved

    This doesn't seem useful? If its purpose is to test some code path, a comment would be nice.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Francis McCabe
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
    Gerrit-Change-Number: 7597327
    Gerrit-PatchSet: 29
    Gerrit-Owner: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
    Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
    Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
    Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
    Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Francis McCabe <f...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Mar 2026 18:08:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Francis McCabe (Gerrit)

    unread,
    Mar 19, 2026, 4:27:26 PM (11 days ago) Mar 19
    to Darius Mercadier, Jakob Kummerow, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Darius Mercadier, Jakob Kummerow and Thibaud Michaud

    Francis McCabe added 23 comments

    Patchset-level comments
    File-level comment, Patchset 30 (Latest):
    Francis McCabe . resolved

    Picked up on key suggestions. The change incorporates changes in nearby code not originally part o cl that had the same issues.

    File src/builtins/arm64/builtins-arm64.cc
    Line 4049, Patchset 29: __ Mov(x8, arg_buffer_reg);
    arg_buffer_reg = x8;
    Jakob Kummerow . resolved

    Can't you just do `__ Mov(kCArgRegs[7], arg_buffer_reg)` up front?

    Francis McCabe

    I have shuffled the register loads around.

    File src/execution/isolate.cc
    Line 6044, Patchset 29: memset(stack->jmpbuf(), 0, sizeof(wasm::JumpBuffer));

    stack->jmpbuf()->state = wasm::JumpBuffer::Active;
    stack->jmpbuf()->stack_limit = stack->jslimit();
    stack->jmpbuf()->parent = nullptr;
    stack->jmpbuf()->is_on_central_stack = true;
    Thibaud Michaud . resolved

    Why is this needed?
    The jump buffer of the active stack is usually considered to be garbage since the SP, FP, etc. are currently changing. The jump buffer is initialized when we switch to a different stack.
    Same thing for the central stack pointers below. They should only be needed after having switched stacks, at which point they should have already been initialized.

    Francis McCabe

    In my defense, this was suggested by Gemini.
    However, if I dont zero out the jmpbuf, v8 does not build.

    File src/wasm/turboshaft-graph-interface.cc
    Line 3880, Patchset 29: this->Asm().StoreOffHeap(
    Jakob Kummerow . resolved

    While you're here: `__ `

    Francis McCabe

    Acknowledged

    Line 3916, Patchset 26: OpIndex loaded = this->Asm().LoadOffHeap(
    Darius Mercadier . resolved

    Use a `V<>` type if possible.

    Francis McCabe

    This is not done anywhere else for OpIndex values.

    Darius Mercadier

    This file is full of `V<>` types. In fact, `OpIndex` appears around 200 times and `V<>` appears 700 times!

    If this specific OpIndex is hard express as `V<>`, that's ok, but please consider doing it. At least `V<Any>` looks like it should work. If the value is guaranteed to be tagged or untagged, you can use `V<Object>` or `V<Untagged>`.

    Thibaud Michaud

    I think it will have to be `Any` at best. The type depends on the `return_types` vector, so to have a more precise `V<>` we would have to do a switch on the `return_types[index]`, where each case does the same load but with a `V<>` that matches the wasm type.
    It's not worth it, especially since we just end up assigning it to `returns[index].op` which is an `OpIndex`.

    Darius Mercadier

    I'd argue that `V<Any>` is better than `OpIndex`, because `OpIndex` is implicitely convertible to any `V<>` but `V<Any>` isn't. Currently the value is immediatly passed to AnnotateResultIfReference so it doesn't make a difference, but if AnnotateResultIfReference was for instance ever updated with wrong assumptions on its input type (encoded via a proper `V<>` input rather than its current `OpIndex`), then we'd get a compile error with `V<Any>` and not with `OpIndex`.

    Thibaud Michaud

    Right, I'm only arguing that assigning something more precise than `Any` would require splitting the load into multiple cases and does not seem worth it. But `V<Any>` sgtm.

    Francis McCabe

    I have converted it to a V<Any>

    Line 3916, Patchset 29: OpIndex ith_return = this->Asm().LoadOffHeap(
    Jakob Kummerow . resolved

    `__ `

    Francis McCabe

    Acknowledged

    Line 3919, Patchset 29 (Parent): __ LoadOffHeap(result_buffer, offset,
    Jakob Kummerow . resolved

    As you can see here, `__` works just fine inside a lambda. Please keep using it, also in the new code.

    Francis McCabe

    Acknowledged

    Line 3938, Patchset 29: this->Asm().StoreOffHeap(arg_buffer, args[index].op,
    Jakob Kummerow . resolved

    `__ `

    Francis McCabe

    Acknowledged

    Line 3964, Patchset 29: OpIndex loaded = this->Asm().LoadOffHeap(
    Jakob Kummerow . resolved

    `__ `

    Francis McCabe

    Acknowledged

    Line 4024, Patchset 29: IF (is_on_central_stack) {

    __ WasmCallRuntime(__ phase_zone(), Runtime::kThrowWasmFXSuspendError, {},
    Jakob Kummerow . resolved

    Any reason this isn't a `__ TrapIf(...)` call?

    Francis McCabe

    Yes, it should be.
    The wasmfx explainer is actually silent on this; but, in keeping with other specs, we should trap. I have also adjusted the Suspend implementation.

    Line 4046, Patchset 29: this->Asm().StoreOffHeap(arg_buffer, args[index].op,
    Jakob Kummerow . resolved

    `__ `, again below

    Francis McCabe

    Acknowledged

    Line 4063, Patchset 29: sig->parameters()[sig->parameters().size() - 1].ref_index());
    Thibaud Michaud . resolved
    ```suggestion
    sig->parameters().last().ref_index());
    ```
    Francis McCabe

    Acknowledged

    Line 4081, Patchset 29: __ WordPtrConstant(reinterpret_cast<uintptr_t>(return_csig))},
    Jakob Kummerow . resolved

    Embedding a pointer constant makes this code uncacheable, but we cache and re-use optimized code across processes. You'll have to embed type index instead; we have relocation support canonical type indices via `__ RelocatableWasmCanonicalSignatureId(sig_index);` (or you can embed the module-specific signature index, but then you'll need to pass the `WasmTrustedInstanceData` along to the C++ function to be able to resolve it to a canonical index).

    Francis McCabe

    Acknowledged

    Line 4102, Patchset 29: V<WasmContinuationObject> allocateContinuation(FullDecoder* decoder) {
    Thibaud Michaud . resolved
    ```suggestion
    V<WasmContinuationObject> AllocateContinuation(FullDecoder* decoder) {
    ```
    Francis McCabe

    Acknowledged

    Line 4141, Patchset 29: // The external pointer is initialized in the {suspend_wasmfx_stack} C call.
    Thibaud Michaud . resolved

    Obsolete comment.

    Francis McCabe

    Acknowledged

    Line 4168, Patchset 29: __ WordPtrConstant(reinterpret_cast<uintptr_t>(csig))},
    Jakob Kummerow . resolved

    Same problem here. This needs to be fixed.

    Francis McCabe

    Acknowledged

    File src/wasm/wasm-external-refs.cc
    Line 1116, Patchset 29: const CanonicalSig* sig) {
    Jakob Kummerow . resolved

    Matching my comment in the graph builder: both here and in `switch_...` below, you'll have to take the signature index.

    Francis McCabe

    Acknowledged

    Line 1124, Patchset 29: if (!to) return kNullAddress;
    Thibaud Michaud . resolved

    I think we prefer to spell it out as `to == nullptr`.

    Francis McCabe

    Acknowledged

    Line 1147, Patchset 29: if (v8_flags.trace_wasm_stack_switching) {

    PrintF("Switch from stack %d to %d\n", from->id(), target_stack->id());
    }
    Thibaud Michaud . resolved

    Can you move this after the early return? I would prefer to only print this if we did find a handler and performed the switch.
    In fact you can merge it with the other trace below, where you print the handler stack.

    Francis McCabe

    Done. It was originally there as an aid to debugging.

    File test/mjsunit/wasm/stack-switching-switch-loop.js
    Line 17, Patchset 29: let sig_coro_idx = builder.types.length;
    Jakob Kummerow . resolved

    `nextTypeIndex()`.

    And the preferred pattern is to use that only once, e.g.:
    ```
    let type2 = builder.nextTypeIndex() + 1;
    let type1 = builder.addType(..., type2, ...);
    /* type2 */ builder.addCont(type1);
    ```

    Francis McCabe

    I have done this. However, I dispute that this way of doing it is clearer.

    Line 23, Patchset 29: let tag_switch = builder.addTag(makeSig([], [kWasmI32]));
    Jakob Kummerow . resolved

    `kSig_i_v` is predefined

    Francis McCabe

    Acknowledged

    File test/mjsunit/wasm/stack-switching-switch.js
    Line 18, Patchset 29: .addBody([kExprLocalGet, 0, kExprDrop]).exportFunc();
    Jakob Kummerow . resolved

    Technically, for a "nop" function, you could also use `kExprNop`, or just an empty body. (You still need to call `.addBody([])` though in order to get the required `kExprEnd`.)

    Francis McCabe

    Acknowledged

    Line 21, Patchset 29: .addLocals(wasmRefType(cont_v_c), 1)
    Jakob Kummerow . resolved

    This doesn't seem useful? If its purpose is to test some code path, a comment would be nice.

    Francis McCabe

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Darius Mercadier
    • Jakob Kummerow
    • Thibaud Michaud
    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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
      Gerrit-Change-Number: 7597327
      Gerrit-PatchSet: 30
      Gerrit-Owner: Francis McCabe <f...@chromium.org>
      Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
      Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
      Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
      Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
      Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
      Gerrit-CC: Hannes Payer <hpa...@chromium.org>
      Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
      Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
      Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
      Gerrit-Comment-Date: Thu, 19 Mar 2026 20:27:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Darius Mercadier <dmerc...@chromium.org>
      Comment-In-Reply-To: Thibaud Michaud <thib...@chromium.org>
      Comment-In-Reply-To: Francis McCabe <f...@chromium.org>
      Comment-In-Reply-To: Jakob Kummerow <jkum...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Jakob Kummerow (Gerrit)

      unread,
      Mar 20, 2026, 7:59:26 AM (11 days ago) Mar 20
      to Francis McCabe, Jakob Kummerow, Darius Mercadier, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
      Attention needed from Darius Mercadier, Francis McCabe and Thibaud Michaud

      Jakob Kummerow voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Darius Mercadier
      • Francis McCabe
      • Thibaud Michaud
      Submit Requirements:
        • requirement is not 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
        Gerrit-Change-Number: 7597327
        Gerrit-PatchSet: 30
        Gerrit-Owner: Francis McCabe <f...@chromium.org>
        Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
        Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
        Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
        Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
        Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
        Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
        Gerrit-Attention: Francis McCabe <f...@chromium.org>
        Gerrit-Comment-Date: Fri, 20 Mar 2026 11:59:22 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Thibaud Michaud (Gerrit)

        unread,
        Mar 20, 2026, 10:11:49 AM (11 days ago) Mar 20
        to Francis McCabe, Jakob Kummerow, Darius Mercadier, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
        Attention needed from Darius Mercadier and Francis McCabe

        Thibaud Michaud added 3 comments

        File src/wasm/turboshaft-graph-interface.cc
        Line 4024, Patchset 29: IF (is_on_central_stack) {
        __ WasmCallRuntime(__ phase_zone(), Runtime::kThrowWasmFXSuspendError, {},
        Jakob Kummerow . unresolved

        Any reason this isn't a `__ TrapIf(...)` call?

        Francis McCabe

        Yes, it should be.
        The wasmfx explainer is actually silent on this; but, in keeping with other specs, we should trap. I have also adjusted the Suspend implementation.

        Thibaud Michaud

        `WebAssembly.SuspendError` was introduced for JSPI based on a user request to make suspension errors catchable. I could imagine that this is similarly useful for core stack switching? Since handlers are dynamically scoped, applications might not always be able to ensure that there is a handler for the next suspend or switch instruction.
        In any case, the current implementation is inconsistent: the builtin still throws `SuspendError` if we don't find a handler. See the `TestSuspendError` test: we throw a `RuntimeError` in the first case, and `SuspendError` in the other cases.

        File test/mjsunit/wasm/stack-switching-switch.js
        Line 146, Patchset 30 (Latest): kSimdPrefix, 0x11, // i32x4.splat
        Thibaud Michaud . unresolved
        ```suggestion
        kSimdPrefix, kExprI32x4Splat,
        ```
        Line 179, Patchset 30 (Latest): if (e.message.includes('SIMD unsupported')) {
        Thibaud Michaud . unresolved

        I would suggest moving this function to `stack-switching-params.js`. We already test passing SIMD parameters for resume/suspend there, and the test is skipped on no-simd configs (see mjsunit.status) so we don't need this try/catch.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Darius Mercadier
        • Francis McCabe
        Submit Requirements:
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
          Gerrit-Change-Number: 7597327
          Gerrit-PatchSet: 30
          Gerrit-Owner: Francis McCabe <f...@chromium.org>
          Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
          Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
          Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
          Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
          Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
          Gerrit-CC: Hannes Payer <hpa...@chromium.org>
          Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
          Gerrit-Attention: Francis McCabe <f...@chromium.org>
          Gerrit-Comment-Date: Fri, 20 Mar 2026 14:11:45 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Francis McCabe (Gerrit)

          unread,
          Mar 20, 2026, 3:55:47 PM (10 days ago) Mar 20
          to Jakob Kummerow, Darius Mercadier, Deepti Gandluri, Thibaud Michaud, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Darius Mercadier, Jakob Kummerow and Thibaud Michaud

          Francis McCabe added 4 comments

          Patchset-level comments
          File-level comment, Patchset 31 (Latest):
          Francis McCabe . resolved

          A couple of things, mainly the handling of failing searches, should be resolved in a follow-up CL.

          File src/wasm/turboshaft-graph-interface.cc
          Line 4024, Patchset 29: IF (is_on_central_stack) {
          __ WasmCallRuntime(__ phase_zone(), Runtime::kThrowWasmFXSuspendError, {},
          Jakob Kummerow . resolved

          Any reason this isn't a `__ TrapIf(...)` call?

          Francis McCabe

          Yes, it should be.
          The wasmfx explainer is actually silent on this; but, in keeping with other specs, we should trap. I have also adjusted the Suspend implementation.

          Thibaud Michaud

          `WebAssembly.SuspendError` was introduced for JSPI based on a user request to make suspension errors catchable. I could imagine that this is similarly useful for core stack switching? Since handlers are dynamically scoped, applications might not always be able to ensure that there is a handler for the next suspend or switch instruction.
          In any case, the current implementation is inconsistent: the builtin still throws `SuspendError` if we don't find a handler. See the `TestSuspendError` test: we throw a `RuntimeError` in the first case, and `SuspendError` in the other cases.

          Francis McCabe

          Suggest that we clear this up in a follow-up cl.

          File test/mjsunit/wasm/stack-switching-switch.js
          Line 146, Patchset 30: kSimdPrefix, 0x11, // i32x4.splat
          Thibaud Michaud . resolved
          ```suggestion
          kSimdPrefix, kExprI32x4Splat,
          ```
          Francis McCabe

          Acknowledged

          Line 179, Patchset 30: if (e.message.includes('SIMD unsupported')) {
          Thibaud Michaud . resolved

          I would suggest moving this function to `stack-switching-params.js`. We already test passing SIMD parameters for resume/suspend there, and the test is skipped on no-simd configs (see mjsunit.status) so we don't need this try/catch.

          Francis McCabe

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Darius Mercadier
          • Jakob Kummerow
          • Thibaud Michaud
          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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 31
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
            Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Comment-Date: Fri, 20 Mar 2026 19:55:44 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Thibaud Michaud <thib...@chromium.org>
            unsatisfied_requirement
            open
            diffy

            Thibaud Michaud (Gerrit)

            unread,
            Mar 23, 2026, 5:58:14 AM (8 days ago) Mar 23
            to Francis McCabe, Jakob Kummerow, Darius Mercadier, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
            Attention needed from Darius Mercadier, Francis McCabe and Jakob Kummerow

            Thibaud Michaud voted and added 3 comments

            Votes added by Thibaud Michaud

            Code-Review+1

            3 comments

            Patchset-level comments
            Thibaud Michaud . resolved

            LGTM

            File src/wasm/turboshaft-graph-interface.cc
            Line 4024, Patchset 29: IF (is_on_central_stack) {
            __ WasmCallRuntime(__ phase_zone(), Runtime::kThrowWasmFXSuspendError, {},
            Jakob Kummerow . unresolved

            Any reason this isn't a `__ TrapIf(...)` call?

            Francis McCabe

            Yes, it should be.
            The wasmfx explainer is actually silent on this; but, in keeping with other specs, we should trap. I have also adjusted the Suspend implementation.

            Thibaud Michaud

            `WebAssembly.SuspendError` was introduced for JSPI based on a user request to make suspension errors catchable. I could imagine that this is similarly useful for core stack switching? Since handlers are dynamically scoped, applications might not always be able to ensure that there is a handler for the next suspend or switch instruction.
            In any case, the current implementation is inconsistent: the builtin still throws `SuspendError` if we don't find a handler. See the `TestSuspendError` test: we throw a `RuntimeError` in the first case, and `SuspendError` in the other cases.

            Francis McCabe

            Suggest that we clear this up in a follow-up cl.

            Thibaud Michaud

            That's fine with me, but right now this change only introduces a new inconsistency. Whether we trap or throw now depends on an implementation detail of the engine (whether we are on the central stack or not).
            Can we revert it and make the change globally in the follow-up?

            File test/mjsunit/wasm/stack-switching-params.js
            Line 290, Patchset 31 (Latest): kSimdPrefix, 0xa3, 0x01, // i32x4.all_true
            Thibaud Michaud . unresolved
            nit:
            ```suggestion
            kSimdPrefix, kExprI32AllTrue,
            ```
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Darius Mercadier
            • Francis McCabe
            • Jakob Kummerow
            Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 31
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-Attention: Francis McCabe <f...@chromium.org>
            Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Comment-Date: Mon, 23 Mar 2026 09:58:10 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Francis McCabe (Gerrit)

            unread,
            Mar 23, 2026, 4:15:12 PM (7 days ago) Mar 23
            to Thibaud Michaud, Jakob Kummerow, Darius Mercadier, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
            Attention needed from Darius Mercadier, Jakob Kummerow and Thibaud Michaud

            Francis McCabe added 2 comments

            File src/wasm/turboshaft-graph-interface.cc
            Line 4024, Patchset 29: IF (is_on_central_stack) {
            __ WasmCallRuntime(__ phase_zone(), Runtime::kThrowWasmFXSuspendError, {},
            Jakob Kummerow . resolved

            Any reason this isn't a `__ TrapIf(...)` call?

            Francis McCabe

            Yes, it should be.
            The wasmfx explainer is actually silent on this; but, in keeping with other specs, we should trap. I have also adjusted the Suspend implementation.

            Thibaud Michaud

            `WebAssembly.SuspendError` was introduced for JSPI based on a user request to make suspension errors catchable. I could imagine that this is similarly useful for core stack switching? Since handlers are dynamically scoped, applications might not always be able to ensure that there is a handler for the next suspend or switch instruction.
            In any case, the current implementation is inconsistent: the builtin still throws `SuspendError` if we don't find a handler. See the `TestSuspendError` test: we throw a `RuntimeError` in the first case, and `SuspendError` in the other cases.

            Francis McCabe

            Suggest that we clear this up in a follow-up cl.

            Thibaud Michaud

            That's fine with me, but right now this change only introduces a new inconsistency. Whether we trap or throw now depends on an implementation detail of the engine (whether we are on the central stack or not).
            Can we revert it and make the change globally in the follow-up?

            Francis McCabe

            Acknowledged

            File test/mjsunit/wasm/stack-switching-params.js
            Line 290, Patchset 31: kSimdPrefix, 0xa3, 0x01, // i32x4.all_true
            Thibaud Michaud . resolved
            nit:
            ```suggestion
            kSimdPrefix, kExprI32AllTrue,
            ```
            Francis McCabe

            For some reason, that doesnt work. However, I have refactored to:
            ...SimdInstr(kExprI32x4AllTrue)
            which does work.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Darius Mercadier
            • Jakob Kummerow
            • Thibaud Michaud
            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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 32
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
            Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Comment-Date: Mon, 23 Mar 2026 20:15:10 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Jakob Kummerow (Gerrit)

            unread,
            Mar 24, 2026, 7:10:05 AM (7 days ago) Mar 24
            to Francis McCabe, Jakob Kummerow, Thibaud Michaud, Darius Mercadier, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
            Attention needed from Darius Mercadier, Francis McCabe and Thibaud Michaud

            Jakob Kummerow voted and added 2 comments

            Votes added by Jakob Kummerow

            Code-Review+1

            2 comments

            File src/execution/isolate.cc
            Line 6044, Patchset 29: memset(stack->jmpbuf(), 0, sizeof(wasm::JumpBuffer));
            stack->jmpbuf()->state = wasm::JumpBuffer::Active;
            stack->jmpbuf()->stack_limit = stack->jslimit();
            stack->jmpbuf()->parent = nullptr;
            stack->jmpbuf()->is_on_central_stack = true;
            Thibaud Michaud . resolved

            Why is this needed?
            The jump buffer of the active stack is usually considered to be garbage since the SP, FP, etc. are currently changing. The jump buffer is initialized when we switch to a different stack.
            Same thing for the central stack pointers below. They should only be needed after having switched stacks, at which point they should have already been initialized.

            Francis McCabe

            In my defense, this was suggested by Gemini.
            However, if I dont zero out the jmpbuf, v8 does not build.

            Jakob Kummerow

            For the record, that's not a defense and not an excuse. As the author of a CL, you're responsible for its contents. Don't upload AI hallucinations you don't understand.

            File test/mjsunit/wasm/stack-switching-params.js
            Line 290, Patchset 31: kSimdPrefix, 0xa3, 0x01, // i32x4.all_true
            Thibaud Michaud . resolved
            nit:
            ```suggestion
            kSimdPrefix, kExprI32AllTrue,
            ```
            Francis McCabe

            For some reason, that doesnt work. However, I have refactored to:
            ...SimdInstr(kExprI32x4AllTrue)
            which does work.

            Jakob Kummerow

            That "some reason" is that `0xa3, 0x01` is a two-byte LEB sequence, but `kExprI32x4AllTrue` can only emit one number. `...SimdInstr(kExprI32x4AllTrue)` is the way to go, it exists specifically for SIMD instructions that need more than one byte after the `kSimdPrefix`.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Darius Mercadier
            • Francis McCabe
            • 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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 34
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-Attention: Thibaud Michaud <thib...@chromium.org>
            Gerrit-Attention: Francis McCabe <f...@chromium.org>
            Gerrit-Comment-Date: Tue, 24 Mar 2026 11:10:00 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Thibaud Michaud (Gerrit)

            unread,
            Mar 24, 2026, 10:17:25 AM (7 days ago) Mar 24
            to Francis McCabe, Jakob Kummerow, Darius Mercadier, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
            Attention needed from Darius Mercadier and Francis McCabe

            Thibaud Michaud added 1 comment

            File src/execution/isolate.cc
            Line 6044, Patchset 29: memset(stack->jmpbuf(), 0, sizeof(wasm::JumpBuffer));
            stack->jmpbuf()->state = wasm::JumpBuffer::Active;
            stack->jmpbuf()->stack_limit = stack->jslimit();
            stack->jmpbuf()->parent = nullptr;
            stack->jmpbuf()->is_on_central_stack = true;
            Thibaud Michaud . resolved

            Why is this needed?
            The jump buffer of the active stack is usually considered to be garbage since the SP, FP, etc. are currently changing. The jump buffer is initialized when we switch to a different stack.
            Same thing for the central stack pointers below. They should only be needed after having switched stacks, at which point they should have already been initialized.

            Francis McCabe

            In my defense, this was suggested by Gemini.
            However, if I dont zero out the jmpbuf, v8 does not build.

            Jakob Kummerow

            For the record, that's not a defense and not an excuse. As the author of a CL, you're responsible for its contents. Don't upload AI hallucinations you don't understand.

            Thibaud Michaud

            +1 to what Jakob said.
            And actually I still have issues with this part of the change. You removed this line:

            ```

            stack->jmpbuf()->state = wasm::JumpBuffer::Active;
            ```

            Which was important among other things because we rely on this state to know how to iterate the stack (see `StackMemory::Iterate()`). And in particular, if the stack is active, we know that we should not rely on the jump buffer to find the first frame. Instead, we look at the `ThreadLocalTop*` structure, as we did before introducing stack switching.

            `Active` is 0, so by doing `memset(..., 0, ...)` you still happen to set the state correctly, but in a much more obfuscated way. And setting the other values should not be needed: if we read the other values somewhere before initializing the jump buffer, something wrong is going on and we should figure out what and fix it.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Darius Mercadier
            • Francis McCabe
            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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 34
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-Attention: Francis McCabe <f...@chromium.org>
            Gerrit-Comment-Date: Tue, 24 Mar 2026 14:17:20 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Thibaud Michaud <thib...@chromium.org>
            Comment-In-Reply-To: Francis McCabe <f...@chromium.org>
            Comment-In-Reply-To: Jakob Kummerow <jkum...@chromium.org>
            satisfied_requirement
            open
            diffy

            Francis McCabe (Gerrit)

            unread,
            Mar 24, 2026, 10:49:34 AM (7 days ago) Mar 24
            to Jakob Kummerow, Thibaud Michaud, Darius Mercadier, Deepti Gandluri, Hannes Payer, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com
            Attention needed from Darius Mercadier

            Francis McCabe voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Darius Mercadier
            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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 34
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            Gerrit-CC: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-CC: Deepti Gandluri <gde...@chromium.org>
            Gerrit-CC: Hannes Payer <hpa...@chromium.org>
            Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
            Gerrit-Comment-Date: Tue, 24 Mar 2026 14:49:31 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            V8 LUCI CQ (Gerrit)

            unread,
            Mar 24, 2026, 10:52:03 AM (7 days ago) Mar 24
            to Francis McCabe, Jakob Kummerow, Thibaud Michaud, Darius Mercadier, Deepti Gandluri, Hannes Payer, AyeAye, victorgo...@chromium.org, cbruni...@chromium.org, leszek...@chromium.org, devtools-...@chromium.org, jgrube...@chromium.org, v8-flag...@chromium.org, oilpan-r...@chromium.org, verwaes...@chromium.org, marja...@chromium.org, mlippau...@chromium.org, pthier...@chromium.org, dmercadi...@chromium.org, v8-ppc...@googlegroups.com, v8-mip...@googlegroups.com, v8-risc...@chromium.org, v8-re...@googlegroups.com, was...@google.com

            V8 LUCI CQ submitted the change

            Change information

            Commit message:
            [wasm][wasmfx] Implement switch instruction.

            BYPASS_LARGE_CHANGE_WARNING: Implementing switch instruction on multiple
            platforms.
            Bug: 388533754
            Change-Id: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Reviewed-by: Jakob Kummerow <jkum...@chromium.org>
            Commit-Queue: Francis McCabe <f...@chromium.org>
            Cr-Commit-Position: refs/heads/main@{#106003}
            Files:
            • M src/builtins/arm/builtins-arm.cc
            • M src/builtins/arm64/builtins-arm64.cc
            • M src/builtins/base.tq
            • 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/external-reference.cc
            • M src/codegen/external-reference.h
            • M src/codegen/interface-descriptors-inl.h
            • M src/codegen/interface-descriptors.h
            • M src/common/globals.h
            • M src/common/message-template.h
            • M src/compiler/turboshaft/builtin-call-descriptors.h
            • M src/execution/isolate.cc
            • M src/wasm/function-body-decoder-impl.h
            • M src/wasm/turboshaft-graph-interface.cc
            • M src/wasm/wasm-builtin-list.h
            • M src/wasm/wasm-external-refs.cc
            • M src/wasm/wasm-external-refs.h
            • M test/mjsunit/wasm/stack-switching-params.js
            • A test/mjsunit/wasm/stack-switching-switch-loop.js
            • A test/mjsunit/wasm/stack-switching-switch.js
            • M test/wasm-spec-tests/wasm-spec-tests.status
            Change size: L
            Delta: 24 files changed, 853 insertions(+), 84 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Jakob Kummerow
            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: I8d626bd36ac21c554d494aa8c3f3525ded914a64
            Gerrit-Change-Number: 7597327
            Gerrit-PatchSet: 35
            Gerrit-Owner: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Francis McCabe <f...@chromium.org>
            Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
            Gerrit-Reviewer: Thibaud Michaud <thib...@chromium.org>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages