Bug 260910

Summary: [Wasm-GC] Remove toJSValue calls for struct operations
Product: WebKit Reporter: Asumu Takikawa <asumu>
Component: WebAssemblyAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 247394    

Asumu Takikawa
Reported 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.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-09-06 09:43:28 PDT
EWS
Comment 2 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.
Note You need to log in before you can comment on or make changes to this bug.