[Webkit-unassigned] [Bug 247394] ☂️ [Wasm-GC] WebAssembly Garbage Collection Proposal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 29 15:07:22 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=247394

Asumu Takikawa <asumu at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|254693, 254694, 254695,     |
                   |254696                      |

--- Comment #2 from Asumu Takikawa <asumu at igalia.com> ---
The patch in https://github.com/WebKit/WebKit/pull/12135 is the last one that I have written for Wasm GC. Unfortunately I can't work on further patches at the moment. In this comment I'll document the other pieces that are needed to complete support for Wasm GC.

  * Semantics
    - Support final attribute for types, this should be pretty simple to implement (https://bugs.webkit.org/show_bug.cgi?id=250107)
    - Support GC types in globals, with suitable JS API conversions by calling extern.internalize & ref.cast (https://bugs.webkit.org/show_bug.cgi?id=252349)
    - Implement packed types (i8, i16) for structs (https://bugs.webkit.org/show_bug.cgi?id=246981)
    - Update element segments and any other table-related sections for GC & typed funcrefs (https://bugs.webkit.org/show_bug.cgi?id=251874)
    - Implement GC bulk array operations if they are added to the spec (https://github.com/WebAssembly/gc/pull/363)
    - Adjust ref.cast validation for upcoming spec changes (https://github.com/WebAssembly/gc/pull/359)
    - Implement br_on_cast and br_on_cast_fail (https://bugs.webkit.org/show_bug.cgi?id=254694)
    - Implement JS API casts at Wasm<->JS function call boundaries (https://bugs.webkit.org/show_bug.cgi?id=254693)
    - Add `nullexternref` and `nullfuncref` types (https://bugs.webkit.org/show_bug.cgi?id=254695)
    - Add new constant expressions that the GC proposal adds (https://bugs.webkit.org/show_bug.cgi?id=254696)
    - Align JSC with new implementation limits: https://github.com/WebAssembly/gc/pull/360

  * Optimization
    - Inline array access & allocation in JIT paths (https://bugs.webkit.org/show_bug.cgi?id=245405)
    - Inline struct allocations in JIT (https://bugs.webkit.org/show_bug.cgi?id=244388)
    - Explore optimizing space usage by putting struct/array data inside the JSObject butterfly
    - BBQJIT tier support

More generally, the proposal will likely do an opcode refactoring and renumbering before it is finalized and reaches stage 4, so that will require changes as well. Currently there is some divergence between the spec and implementations in terms of supported opcodes, so it may be necessary to temporarily support other opcodes to be able to run example Wasm GC code produced by toolchains.

Only a subset of GC spec tests are imported into JSC tests currently, as there are tests that depend on some of the open bugs above (e.g., array tests depend on array allocation constant expressions for globals).


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=254693
[Bug 254693] [Wasm-GC] Implement casts at Wasm-JS function call boundaries
https://bugs.webkit.org/show_bug.cgi?id=254694
[Bug 254694] [Wasm-GC] Implement br_on_cast and br_on_cast_fail
https://bugs.webkit.org/show_bug.cgi?id=254695
[Bug 254695] [Wasm-GC] Add nullexternref and nullfuncref types
https://bugs.webkit.org/show_bug.cgi?id=254696
[Bug 254696] [Wasm-GC] Add support for new constant expressions
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230329/c7371f41/attachment-0001.htm>


More information about the webkit-unassigned mailing list