-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the updated reference types proposal #147
Comments
One thing I think may also need an update is the One possible solution would be switching |
See also #148
I think this would be best, since
I am also in favor of removing the everything-can-implicitly-be-a-reference stuff. If we have APIs for creating/manipulating |
Yeah, this is one of the issues I mentioned when we discussed the changes to references. To be honest, I still don't know how to address that properly. Conflating the types for references and values would be a very bad idea IMO. They are different categories, and moving forward there will be more places that are specific to references. So if going the union route, than a more appropriate solution is to introduce a new union for references (and maybe hack it so that it can be treated as a subtype of value?). However, another problem with the union approach is that I don't know how to make it scale and how to make it future-proof. It assumes a fixed partitioning into disjoint kinds of refs, but what if that changes as the language evolves, e.g., some of these become subcategories of another, or some overlap? |
There's been a few changes to the reference types proposal which I don't believe have been reflected into the C API. Notably I think a few things need to be added to fully support the reference types proposal:
wasm_val_t
should be extended with awasm_func_t
orwasm_funcref_t
variant in its unionexternref
value should be supported, either through construction ofwasm_ref_t
directly or through a new typewasm_externref_t
.wasm_ref_t
and other types should still be supported (or if types likewasm_module_t
should be convert-ible to references)The text was updated successfully, but these errors were encountered: