Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ commands:
description: "install canary version of node"
steps:
- install-node-version:
node_version: "23.0.0-v8-canary20240819f52f1c2f1c"
node_version: "24.0.0-v8-canary202411045365c9d9be"
canary: true
install-v8:
description: "install v8 using jsvu"
Expand Down
4 changes: 4 additions & 0 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -2344,6 +2344,10 @@ addToLibrary({
'maximum': {{{ toIndexType(INITIAL_TABLE) }}},
#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
'element': 'anyfunc'
Expand Down
4 changes: 2 additions & 2 deletions src/library_dylink.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ var LibraryDylink = {
var memAlign = Math.pow(2, metadata.memoryAlign);
// prepare memory
var memoryBase = metadata.memorySize ? alignMemory(getMemory(metadata.memorySize + memAlign), memAlign) : 0; // TODO: add to cleanups
var tableBase = metadata.tableSize ? wasmTable.length : 0;
var tableBase = metadata.tableSize ? {{{ from64Expr('wasmTable.length') }}} : 0;
if (handle) {
{{{ makeSetValue('handle', C_STRUCTS.dso.mem_allocated, '1', 'i8') }}};
{{{ makeSetValue('handle', C_STRUCTS.dso.mem_addr, 'memoryBase', '*') }}};
Expand All @@ -657,7 +657,7 @@ var LibraryDylink = {
#if DYLINK_DEBUG
dbg("loadModule: growing table: " + tableGrowthNeeded);
#endif
wasmTable.grow(tableGrowthNeeded);
wasmTable.grow({{{ toIndexType('tableGrowthNeeded') }}});
}
#if DYLINK_DEBUG
dbg("loadModule: memory[" + memoryBase + ":" + (memoryBase + metadata.memorySize) + "]" +
Expand Down
2 changes: 1 addition & 1 deletion src/preamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ function instrumentWasmTableWithAbort() {
var realGet = wasmTable.get;
var wrapperCache = {};
wasmTable.get = (i) => {
var func = realGet.call(wasmTable, i);
var func = realGet.call(wasmTable, {{{ toIndexType('i') }}});
var cached = wrapperCache[i];
if (!cached || cached.func !== func) {
cached = wrapperCache[i] = {
Expand Down
13 changes: 11 additions & 2 deletions test/core/test_module_wasm_memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@
* found in the LICENSE file.
*/

Module['wasmMemory'] = new WebAssembly.Memory({ 'initial': 256, 'maximum': 256,
Module['wasmMemory'] = new WebAssembly.Memory({
#if MEMORY64
'index': 'i64'
'initial': 256n,
'maximum': 256n,
'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',
#else
'initial': 256,
'maximum': 256,
#endif
});
Loading