Bug 243208

Summary: [WASM-GC] Add support for struct.new, struct.get and struct.set
Product: WebKit Reporter: Dmitry <dbezhetskov>
Component: WebAssemblyAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, ews-watchlist, gyuyoung.kim, keith_miller, mark.lam, msaboff, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 247394    
Attachments:
Description Flags
Patch
none
Patch
none
Patch dbezhetskov: review?, ews-feeder: commit-queue-

Description Dmitry 2022-07-26 04:26:52 PDT
Wasm GC proposal introduces structs (https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md#structures)
To enhance support of Wasm GC proposal in JSC this patch supports struct.new, struct.get and struct.set operations. These operations have been chosen because it is convenient to test it together and hard to test it separately.
Current implementation isn't optimal, at least for B3 and Air tiers, but optimization (replacing runtime call to a load by known offset) for struct.get/set could be easily added as a next step.
Comment 1 Dmitry 2022-07-27 08:48:11 PDT
Created attachment 461243 [details]
Patch
Comment 2 Dmitry 2022-07-27 08:51:14 PDT
Created attachment 461245 [details]
Patch
Comment 3 Dmitry 2022-07-27 08:52:26 PDT
Created attachment 461246 [details]
Patch
Comment 4 EWS Watchlist 2022-07-27 08:54:23 PDT
This patch modifies one of the wasm.json files. Please ensure that any changes in one have been mirrored to the other. You can find the wasm.json files at "Source/JavaScriptCore/wasm/wasm.json" and "JSTests/wasm/wasm.json".
Comment 5 Radar WebKit Bug Importer 2022-08-02 04:27:16 PDT
<rdar://problem/97971445>
Comment 6 Dmitry 2022-08-15 05:36:20 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3303
Comment 7 EWS 2022-10-15 11:20:19 PDT
Committed 255586@main (481cb6061b39): <https://commits.webkit.org/255586@main>

Reviewed commits have been landed. Closing PR #3303 and removing active labels.
Comment 8 Yusuke Suzuki 2022-10-15 14:31:56 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/5421
Comment 9 EWS 2022-10-15 14:34:35 PDT
Committed 255592@main (463d09c7e89e): <https://commits.webkit.org/255592@main>

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