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

table: Add table.fill and table.init #5421

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charmitro
Copy link
Contributor

This commit introduces support for WebAssembly 2.0 (Draft 2025-01-28)1 bulk table operations, specifically table.fill and table.init.

These methods allow for efficient filling and initialization of table ranges.

The implementation includes bounds-checked fill and init operations in VMTable for low-level functionality, with these methods exposed through the Table abstraction and system backend for consistent API access. These additions align with WebAssembly 2.0's bulk memory and table instructions (Section 7.6).

Copy link

promptless bot commented Feb 22, 2025

✅ No documentation updates required.

This commit introduces support for WebAssembly 2.0 (Draft
2025-01-28)[1] bulk table operations, specifically `table.fill` and
`table.init`.

These methods allow for efficient filling and initialization of table
ranges.

The implementation includes bounds-checked `fill` and `init`
operations in `VMTable` for low-level functionality, with these
methods exposed through the `Table` abstraction and system backend for
consistent API access. These additions align with WebAssembly 2.0's
bulk memory and table instructions (Section 7.6).

[1]: https://webassembly.github.io/spec/core/bikeshed/#bulk-memory-and-table-instructions%E2%91%A0

Signed-off-by: Charalampos Mitrodimas <[email protected]>
@xdoardo
Copy link
Collaborator

xdoardo commented Feb 24, 2025

LGTM! I think that before merging we should add a couple tests: we already have some tests available for table operations in lib/api/tests/externals.rs, I'd add them there.

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