Skip to content

Conversation

@imikushin
Copy link
Contributor

@imikushin imikushin commented Jul 19, 2023

Introduce support for recursive types as part of the ongoing WebAssembly GC proposal implementation.

Matching rules for subtypes had to be updated to accommodate recursive types.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A couple things below before we can merge this.

Additionally, can we have some tests for

  • Empty rec groups
  • Invalid modules that try to be type recursive across different groups
  • Any other edge cases you can think of

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, very close! Just one thing left to address before we can merge this. Thanks for your patience!

@fitzgen fitzgen merged commit 3f0e373 into bytecodealliance:main Aug 23, 2023
@imikushin imikushin deleted the rec-groups branch August 23, 2023 17:45
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this pull request Aug 25, 2023
This commit is a follow-up to bytecodealliance#1134 to require the `gc` feature flag be
activated to use the `(rec ...)` construct from the GC wasm proposal.
This additionally updates the text parsing and text printing to consider
the structure of what's parsed for encoding/printing rather than the
size of the types inside. Even a `rec` group of a single type prints a
`rec` group or encodes it now instead of silently switching it back to a
single-type encoding.
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this pull request Aug 25, 2023
This commit is a follow-up to bytecodealliance#1134 to require the `gc` feature flag be
activated to use the `(rec ...)` construct from the GC wasm proposal.
This additionally updates the text parsing and text printing to consider
the structure of what's parsed for encoding/printing rather than the
size of the types inside. Even a `rec` group of a single type prints a
`rec` group or encodes it now instead of silently switching it back to a
single-type encoding.
alexcrichton added a commit that referenced this pull request Aug 25, 2023
This commit is a follow-up to #1134 to require the `gc` feature flag be
activated to use the `(rec ...)` construct from the GC wasm proposal.
This additionally updates the text parsing and text printing to consider
the structure of what's parsed for encoding/printing rather than the
size of the types inside. Even a `rec` group of a single type prints a
`rec` group or encodes it now instead of silently switching it back to a
single-type encoding.
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

Successfully merging this pull request may close these issues.

2 participants