[wasm][turboshaft] Support array.get/set in Wasm-in-JS inlining [v8/v8 : main]

0 views
Skip to first unread message

Daniel Lehmann (Gerrit)

unread,
Apr 2, 2026, 6:26:45 PM (3 days ago) Apr 2
to Matthias Liedtke, V8 LUCI CQ, AyeAye, dmercadi...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Matthias Liedtke

Daniel Lehmann added 3 comments

File src/compiler/turboshaft/assembler.h
Line 5079, Patchset 1 (Latest): return ReduceIfReachableAssertNotNull(
Daniel Lehmann . unresolved

This is a general observation with any operation that I add support for in the Wasm-in-JS body inlining (and thus the JS pipeline): I always need to add these optional FrameStates. Is there maybe a smarter way to reuse more code with smaller diffs from the Turboshaft graph builder? Should I add a global `wasm_inlining_frame_state` to the `PipelineData` (or somewhere else) instead of threading it through the operations?

File src/compiler/turboshaft/operations.h
Line 7352, Patchset 1 (Latest):struct AssertNotNullOp : OperationT<AssertNotNullOp> {
Daniel Lehmann . unresolved

See question above. Much of this CL is simply threading the `frame_state` through, maybe we should just get it for `TrapIf` (when lowering) from some global state...

File src/wasm/turboshaft-graph-interface.cc
Line 9026, Patchset 1 (Latest): V<Word32> length = __ ArrayLength(
Daniel Lehmann . unresolved

Drive-by `V<>`ifycation.

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: Id577bd6794d9063206665ef8267ab015532de75d
Gerrit-Change-Number: 7726144
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Lehmann <dleh...@chromium.org>
Gerrit-Reviewer: Daniel Lehmann <dleh...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Apr 2026 22:26:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Daniel Lehmann (Gerrit)

unread,
Apr 2, 2026, 7:13:24 PM (3 days ago) Apr 2
to Matthias Liedtke, V8 LUCI CQ, AyeAye, dmercadi...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Matthias Liedtke

Daniel Lehmann voted and added 1 comment

Votes added by Daniel Lehmann

Commit-Queue+1

1 comment

File src/compiler/turboshaft/assembler.h
Line 5079, Patchset 1 (Latest): return ReduceIfReachableAssertNotNull(
Daniel Lehmann . unresolved

This is a general observation with any operation that I add support for in the Wasm-in-JS body inlining (and thus the JS pipeline): I always need to add these optional FrameStates. Is there maybe a smarter way to reuse more code with smaller diffs from the Turboshaft graph builder? Should I add a global `wasm_inlining_frame_state` to the `PipelineData` (or somewhere else) instead of threading it through the operations?

Daniel Lehmann

Uh, I think I found a nice solution, see https://crrev.com/c/7726388: How about implementing `REDUCE(TrapIf)` in the WasmInJsInliningReducer, which passes in a "currently active FrameState", which it gets from the surrounding JS->Wasm call. Then all the intermediate ops don't need to know about it and I don't need to touch the Turboshaft Assembler interface, *Ops, nor `WasmLoweringReducer`.

Matthias, Darius, WDYT about that?

Open in Gerrit

Related details

Attention is currently required from:
  • Matthias Liedtke
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: Id577bd6794d9063206665ef8267ab015532de75d
Gerrit-Change-Number: 7726144
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Lehmann <dleh...@chromium.org>
Gerrit-Reviewer: Daniel Lehmann <dleh...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Apr 2026 23:13:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Daniel Lehmann <dleh...@chromium.org>
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages