Bug 239493

Summary: [WASM-GC] Introduce rtt types
Product: WebKit Reporter: Dmitry <dbezhetskov>
Component: WebAssemblyAssignee: Dmitry <dbezhetskov>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
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 none

Description Dmitry 2022-04-19 06:12:27 PDT
Though rtt types currently not actively used they are still required in Wasm GC MVP: https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md.

Particularly, they are needed for struct.new* instructions, but struct constructors can avoid rtts usage.

Because of all that rtt prototype support should be added in JSC to move forward with struct types.
Comment 1 Dmitry 2022-04-19 06:20:27 PDT
Created attachment 457883 [details]
Patch
Comment 2 EWS Watchlist 2022-04-19 06:21:52 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 3 Dmitry 2022-04-24 22:38:57 PDT
Created attachment 458242 [details]
Patch
Comment 4 Keith Miller 2022-04-25 10:35:28 PDT
Comment on attachment 458242 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458242&action=review

Looks good to me but you have a typo in your error message.

> Source/JavaScriptCore/wasm/WasmFunctionParser.h:1052
> +            WASM_VALIDATOR_FAIL_IF(typeIndex >= m_info.typeCount(), "rtt.canon index ", typeIndex, " is out of bound");

typo: bound => bounds.
Comment 5 Dmitry 2022-04-25 22:06:53 PDT
Created attachment 458329 [details]
Patch
Comment 6 Dmitry 2022-04-25 22:07:47 PDT
Thanks for the typo, Keith! It was fixed.
Comment 7 Keith Miller 2022-04-25 22:41:44 PDT
Comment on attachment 458329 [details]
Patch

r=me. Do you want me to commit queue too?
Comment 8 Radar WebKit Bug Importer 2022-04-26 06:13:14 PDT
<rdar://problem/92329753>
Comment 9 EWS 2022-04-27 08:52:55 PDT
Committed r293510 (?): <https://commits.webkit.org/r293510>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458329 [details].
Comment 10 EWS 2022-05-18 06:49:31 PDT
Committed r294395 (250689@main): <https://commits.webkit.org/250689@main>

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