Bug 260910 - [Wasm-GC] Remove toJSValue calls for struct operations
Summary: [Wasm-GC] Remove toJSValue calls for struct operations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 247394
  Show dependency treegraph
 
Reported: 2023-08-30 09:42 PDT by Asumu Takikawa
Modified: 2023-09-20 11:13 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Asumu Takikawa 2023-08-30 09:42:45 PDT
Currently the internal API for Wasm GC struct objects is set up so that the `set` operation takes a `JSValue` and coerces it to a Wasm value.

I think this internal API was motivated initially by the JS API or by specific JS->Wasm use cases, but it adds overhead unnecessarily to engine-internal uses such as in various C++ Wasm operations because of the extra `toJSValue` call that's necessary.

This could be solved by either adding a new function (or renaming `set` and repurposing it) that doesn't do this coercion and requires the value to already be a wasm value, or by changing `set` to not do the coercion.
Comment 1 Radar WebKit Bug Importer 2023-09-06 09:43:28 PDT
<rdar://problem/115060953>
Comment 2 EWS 2023-09-20 11:13:25 PDT
Committed 268211@main (daaaece7a06e): <https://commits.webkit.org/268211@main>

Reviewed commits have been landed. Closing PR #17364 and removing active labels.