WebAssembly / shared-everything-threads

A draft proposal for spawning threads in WebAssembly
Other
29 stars 1 forks source link

Validation of reference conversions #65

Open abrown opened 3 weeks ago

abrown commented 3 weeks ago

The new incoming instructions any.convert_extern and extern.convert_any currently expect a ref extern and ref any on the stack (respectively). With this proposal, it looks like these instructions should become polymorphic over the shared-ness of those incoming types. E.g., any.convert_extern (ref (shared extern)) should be legal and the validator should understand the pushed type as a (ref (shared any).

Some questions:

tlively commented 3 weeks ago

Yes, making these instructions polymorphic seems like the right approach. This is described in the first paragraph here, but it would probably be helpful to exhaustively list all of the instructions this applies to.