Skip to content

Implement the table64 extension to the memory64 proposal#1531

Merged
fitzgen merged 5 commits intobytecodealliance:mainfrom
alexcrichton:table64
May 4, 2024
Merged

Implement the table64 extension to the memory64 proposal#1531
fitzgen merged 5 commits intobytecodealliance:mainfrom
alexcrichton:table64

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

Brings wasm-tools and all the various bits and pieces here up-to-date with the latest version of the spec. This includes support for a toggle between using i32 or i64 as the index type for tables along with all the consequences therein.

Fix validation of `local.tee` to push the local's type, not the actual
type.
This commit implements validation, fuzzing, printing, etc, for the
extension of the memory64 proposal that adds 64-bit tables. These tables
work similarly to memories where the index type is statically listed and
is required for all various operations. The bulk of the changes here
were to wasm-smith to generate modules with these new table
instructions.
@alexcrichton
Copy link
Copy Markdown
Member Author

I'll note that this was mostly motivated by keeping up to date with the testsuite submodule which now has table64 tests, coupled with the fact that implementing it wasn't too too bad.

In updating the spec testsuite submodule that uncovered a minor issue with the gc proposal's validation of local.tee which is fixed in the first commit. The second commit actually updates the submodule and re-blesses all output, and the final commit gets all the tests passing for the spec testsuite submodule.

I'm running the validate_valid_module fuzzer locally for awhile to try to suss out any lingering issues there.

@alexcrichton alexcrichton requested a review from fitzgen May 4, 2024 03:58
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We really gotta bit the bullet and get this crate using wasm-encoder one of these days... Wish I did it years ago...

@fitzgen fitzgen added this pull request to the merge queue May 4, 2024
Merged via the queue into bytecodealliance:main with commit 31dca17 May 4, 2024
config.allow_start_export = false;

// NB: just added "table64" support to this and wasmtime doens't
// implement that yet
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

doesn't

@alexcrichton alexcrichton deleted the table64 branch May 6, 2024 16:01
alexcrichton added a commit to alexcrichton/wasm-tools that referenced this pull request May 6, 2024
@alexcrichton alexcrichton mentioned this pull request May 6, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 6, 2024
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.

3 participants