Skip to content

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Sep 17, 2025

This makes wasm using table64 (included in memory64) can be used in wasm-split.

To be strict we should use different data types than Index, which is uint32_t; for memory64 we use Address class to represent the address. But it is unlikely that table indices would ever go above uint32_t range, and we are not even sure if engines support that many. We can consider using Address for table indices, but the use of Index for table indices is currently not only limited to module-splitting utils, so I think we can cross that bridge when it becomes really necessary.

Note that when creating a new table, we don't create it as an i64 table even if memory64 is enabled, because it is not necessary. We only deal with existing i64 tables.

Fixes #7716.

This makes wasm using table64 (included in memory64) can be used in
wasm-split. To be strict we should use different data types than
`Index`, which is `uint32_t`; for memory64 we use `Address` class to
represent the address. But it is unlikely that table indices would ever
go above `uint32_t` range, and we are not even sure if engines support
that many. To be strict we should be using `Address` for table indices
as well, but the use of `Index` for table indices is currently not only
limited to module-splitting utils, so I think we can cross that bridge
when it becomes really necessary.

Fixes WebAssembly#7716.
@aheejin aheejin requested a review from tlively September 17, 2025 05:45
@aheejin aheejin merged commit 94aecc2 into WebAssembly:main Sep 18, 2025
16 checks passed
@aheejin aheejin deleted the split_table64 branch September 18, 2025 19:06
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.

wasm-split support for memory64
2 participants