bytecodealliance / wasm-tools

CLI and Rust libraries for low-level manipulation of WebAssembly modules
Apache License 2.0
1.3k stars 234 forks source link

threads: add `shared` tables #1649

Closed abrown closed 2 months ago

abrown commented 3 months ago

This change spreads shared attributes on to tables. As with #1480, this does not yet turn on fuzzing for shared things so the only checking is via the in-progress test suite in tests/local/shared-everything-threads.

Implementing this raises an issue with the spec: the addition of shared in the text format means that inline table expressions (e.g., (table <type> (elem ...))) are difficult to parse: the parser would potentially have to look past two tokens now, shared and i32|i64 to see if a type appears that indicates we should be parsing an inline format. There are multiple options for what to do here; I opened an issue to figure this out at the spec level first (https://github.com/bytecodealliance/wasm-tools/pull/71).

abrown commented 3 months ago

DO NOT MERGE: this is based on #1646 and will be rebased once that merges.

abrown commented 3 months ago

Ok, this is rebased and ready for review.