Skip to content

Commit

Permalink
[wasm64] Rename index to address in new WebAssembly.Memory (#22785)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 authored Oct 25, 2024
1 parent 218195c commit ec86f21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/runtime_init_memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ if (!ENVIRONMENT_IS_PTHREAD) {
'shared': true,
#endif
#if MEMORY64 == 1
'address': 'i64',
// TODO(sbc): remove this alias for `address` once both firefox and
// chrome roll out the spec change.
// See https://github.com/WebAssembly/memory64/pull/92
'index': 'i64',
#endif
});
Expand Down
2 changes: 1 addition & 1 deletion src/runtime_shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var toIndexType = (function() {
var bigintMemoryBounds = 1;
try {
/** @suppress {checkTypes} */
new WebAssembly.Memory({'initial': 1n, 'index': 'i64'});
new WebAssembly.Memory({'initial': 1n, 'index': 'i64', 'address': 'i64'});
} catch (e) {
bigintMemoryBounds = 0;
}
Expand Down

0 comments on commit ec86f21

Please sign in to comment.