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

Implement the reference types proposal #155

Merged
merged 4 commits into from Feb 5, 2020

Conversation

alexcrichton
Copy link
Collaborator

This commit enables the reference-types and bulk-memory-operations
proposals from the upstream wasm spec test suite. This involved fully
implementing the reference types proposal, notably passive element
segments as well as a few table-related instructions. A summary of the
changes made here are:

  • TableCopy, TableInit, and ElemDrop are now all implemented instructions.
  • All element segments now live as an Element type rather than being
    embedded directly into a Table. This is because they all need an
    index to refer to in ElemDrop instructions and such.
  • Type checking has been updated to handle subtyping
  • The Funcref and Nullref value types have been added
  • Tables now list their element type as a struct field
  • Elements now participate in GC passes
  • Global initializers are expanded with ref.func and ref.null

This commit enables the `reference-types` and `bulk-memory-operations`
proposals from the upstream wasm spec test suite. This involved fully
implementing the reference types proposal, notably passive element
segments as well as a few table-related instructions. A summary of the
changes made here are:

* `TableCopy`, `TableInit`, and `ElemDrop` are now all implemented instructions.
* All element segments now live as an `Element` type rather than being
  embedded directly into a `Table`. This is because they all need an
  index to refer to in `ElemDrop` instructions and such.
* Type checking has been updated to handle subtyping
* The `Funcref` and `Nullref` value types have been added
* Tables now list their element type as a struct field
* Elements now participate in GC passes
* Global initializers are expanded with `ref.func` and `ref.null`
@alexcrichton alexcrichton merged commit 121340d into rustwasm:master Feb 5, 2020
@alexcrichton alexcrichton deleted the reference-types branch February 5, 2020 22:01
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.

None yet

1 participant