-
Notifications
You must be signed in to change notification settings - Fork 295
CM+GC: Define and validate GC lowerings for most component model types #2183
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
CM+GC: Define and validate GC lowerings for most component model types #2183
Conversation
2a04974
to
63197a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice suite of tests 👍
Two questions:
- What are you thinking of doing with the
Abi
field here? It looks like it's not used, although I could be missing it. I was naively expecting one direction to require a precisestruct
where the other direction would accept up to ananyref
or something like that but I didn't see that. - Do you have an idea for how variants will be supported? I figure that's something we should at least have a plan for before landing the other bits since it's such a foundational data type in the component model
Yeah I wanted to leave the option open for doing just that, but I didn't want to bite it off quite yet.
My thinking is that we will match against an empty The main alternative I've come up with is adding new canonical options for saying something like "the |
This commit defines the expected lowerings for most component model types (primitives, records, strings, tuples, etc..) and implements their validation. This commit also defines futures and streams as `externref`s in the GC ABI, but it does not plumb that through to all of the async intrinsics yet. Finally, this commit does *not* yet define the expected lowerings for variants and variant-like types (options and results). This is because it isn't 100% clear how to lower sum types to GC types yet, especially with the way that we are doing shallow-matching to allow for the "same" type from any rec group to be used.
9cd9a2e
to
403c762
Compare
Rebased and review comments addressed. This should be good for a final review. |
This commit defines the expected lowerings for most component model types (primitives, records, strings, tuples, etc..) and implements their validation.
This commit also defines futures and streams as
externref
s in the GC ABI, but it does not plumb that through to all of the async intrinsics yet.Finally, this commit does not yet define the expected lowerings for variants and variant-like types (options and results). This is because it isn't 100% clear how to lower sum types to GC types yet, especially with the way that we are doing shallow-matching to allow for the "same" type from any rec group to be used.