Bug 239668
Summary: | [Wasm-GC] Add support for subtyping declarations | ||
---|---|---|---|
Product: | WebKit | Reporter: | Asumu Takikawa <asumu> |
Component: | WebAssembly | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bashorov, dbezhetskov, saam, webkit-bug-importer, ysuzuki |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 247394 |
Asumu Takikawa
As mentioned in https://bugs.webkit.org/show_bug.cgi?id=239666, full support of the Wasm GC proposal requires type system support for both recursion groups and subtyping declarations.
In the latest GC proposal design, subtyping (e.g., for struct types) is declared explicitly with a `sub` operator:
Example:
```
(module
(type $s1 (struct))
(type $s2 (sub $s1 (field i32)))
)
```
The binary format allows for multiple supertypes, but the MVP design will restrict it to one supertype.
A reference type with an index to a type definition that has supertypes will be compatible with a reference type to its supertype index.
Only array and struct types will support subtyping at first, so it likely makes sense to implement this after struct operations and recursive types land.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Asumu Takikawa
There was a mistake in the example, it should have a `struct` operator in there:
```
(module
(type $s1 (struct))
(type $s2 (sub $s1 (struct (field i32))))
)
```
Radar WebKit Bug Importer
<rdar://problem/92538296>
Asumu Takikawa
Pull request: https://github.com/WebKit/WebKit/pull/5786
EWS
Committed 256243@main (431164ca6a4b): <https://commits.webkit.org/256243@main>
Reviewed commits have been landed. Closing PR #5786 and removing active labels.
bashorov
I'm wondering if there is an umbrella issue to track progress about GC proposal support?
Also, could you please suggest how I may try current state in the Safari(I guess in Technology Preview)? Specifically how I cen turn on relevant options in Safari?
Asumu Takikawa
(In reply to bashorov from comment #5)
> I'm wondering if there is an umbrella issue to track progress about GC
> proposal support?
>
> Also, could you please suggest how I may try current state in the Safari(I
> guess in Technology Preview)? Specifically how I cen turn on relevant
> options in Safari?
I just created an umbrella bug for GC here: https://bugs.webkit.org/show_bug.cgi?id=247394
There is still a bunch of work needed to run non-trivial Wasm GC programs, but a subset of the spec tests will pass.
There is a `--useWebAssemblyGC` flag for JSC that you can toggle if you build JSC standalone. Not sure it is exposed via WebKit and visible in the Safari UI though.
bashorov
> I just created an umbrella bug for GC
Cool, thanks!
> Not sure it is exposed via WebKit and visible in the Safari UI though.
Where/who is right place/person to ask about it?
David Degazio
*** Bug 233919 has been marked as a duplicate of this bug. ***