Skip to content
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

js-api: ToValueType doesn't accept GC heap types #500

Open
eqrion opened this issue Dec 19, 2023 · 2 comments
Open

js-api: ToValueType doesn't accept GC heap types #500

eqrion opened this issue Dec 19, 2023 · 2 comments

Comments

@eqrion
Copy link
Contributor

eqrion commented Dec 19, 2023

Ref to the spec.

ToValueType (which is used in global and table constructors) doesn't appear to support any of the GC heap types such as anyref. SM and V8 appear to both support this for most of the GC heap types. We appear to diverge around the bottom types (SM accepts 'nullfuncref', V8 does not).

It also looks like SM has a form of {ref: heaptypestring, nullable: boolean} that we support as well. I think we added this for testing and it slipped through.

cc: @takikawa @jakobkummerow

@rossberg
Copy link
Member

I had assumed the new types were intentionally left out for now.

But while looking, I also noticed #501.

@eqrion
Copy link
Contributor Author

eqrion commented Dec 20, 2023

I had assumed the new types were intentionally left out for now.

But while looking, I also noticed #501.

That may have been the case, but it seems that both V8 and SM at least implement some of the GC heap types. I personally think supporting all the GC heap types via their shorthands makes sense as it's pretty easy. Non-nullable types or references to type definitions should probably be left out for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants