Bug 239493 - [WASM-GC] Introduce rtt types
Summary: [WASM-GC] Introduce rtt types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dmitry
URL:
Keywords: InRadar
Depends on:
Blocks: 247394
  Show dependency treegraph
 
Reported: 2022-04-19 06:12 PDT by Dmitry
Modified: 2022-11-02 17:15 PDT (History)
7 users (show)

See Also:


Attachments
Patch (28.85 KB, patch)
2022-04-19 06:20 PDT, Dmitry
no flags Details | Formatted Diff | Diff
Patch (29.83 KB, patch)
2022-04-24 22:38 PDT, Dmitry
no flags Details | Formatted Diff | Diff
Patch (29.83 KB, patch)
2022-04-25 22:06 PDT, Dmitry
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.