Skip to content

Commit f6ac03e

Browse files
committed
Update node canary
This involved using toIndexType in a few more places due to recent wasm64 changes requiring BitInt in more places. Split out from emscripten-core#22773
1 parent 974ede7 commit f6ac03e

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ commands:
106106
description: "install canary version of node"
107107
steps:
108108
- install-node-version:
109-
node_version: "23.0.0-v8-canary20240819f52f1c2f1c"
109+
node_version: "24.0.0-v8-canary20241031a6869d77cc"
110110
canary: true
111111
install-v8:
112112
description: "install v8 using jsvu"

src/library.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,6 +2345,7 @@ addToLibrary({
23452345
#endif
23462346
#if MEMORY64 == 1
23472347
'index': 'i64',
2348+
'address': 'i64',
23482349
#endif
23492350
'element': 'anyfunc'
23502351
});

src/library_dylink.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ var LibraryDylink = {
639639
var memAlign = Math.pow(2, metadata.memoryAlign);
640640
// prepare memory
641641
var memoryBase = metadata.memorySize ? alignMemory(getMemory(metadata.memorySize + memAlign), memAlign) : 0; // TODO: add to cleanups
642-
var tableBase = metadata.tableSize ? wasmTable.length : 0;
642+
var tableBase = metadata.tableSize ? {{{ from64Expr('wasmTable.length') }}} : 0;
643643
if (handle) {
644644
{{{ makeSetValue('handle', C_STRUCTS.dso.mem_allocated, '1', 'i8') }}};
645645
{{{ makeSetValue('handle', C_STRUCTS.dso.mem_addr, 'memoryBase', '*') }}};
@@ -657,7 +657,7 @@ var LibraryDylink = {
657657
#if DYLINK_DEBUG
658658
dbg("loadModule: growing table: " + tableGrowthNeeded);
659659
#endif
660-
wasmTable.grow(tableGrowthNeeded);
660+
wasmTable.grow({{{ toIndexType('tableGrowthNeeded') }}});
661661
}
662662
#if DYLINK_DEBUG
663663
dbg("loadModule: memory[" + memoryBase + ":" + (memoryBase + metadata.memorySize) + "]" +

src/preamble.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function instrumentWasmTableWithAbort() {
588588
var realGet = wasmTable.get;
589589
var wrapperCache = {};
590590
wasmTable.get = (i) => {
591-
var func = realGet.call(wasmTable, i);
591+
var func = realGet.call(wasmTable, {{{ toIndexType('i') }}});
592592
var cached = wrapperCache[i];
593593
if (!cached || cached.func !== func) {
594594
cached = wrapperCache[i] = {

test/core/test_module_wasm_memory.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
* found in the LICENSE file.
77
*/
88

9-
Module['wasmMemory'] = new WebAssembly.Memory({ 'initial': 256, 'maximum': 256,
9+
Module['wasmMemory'] = new WebAssembly.Memory({
10+
'initial': {{{ toIndexType('256') }}},
11+
'maximum': {{{ toIndexType('256') }}},
1012
#if MEMORY64
11-
'index': 'i64'
13+
'index': 'i64',
14+
'address': 'i64',
1215
#endif
1316
});

test/test_core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5952,6 +5952,8 @@ def test_unistd_pipe(self):
59525952

59535953
@also_with_noderawfs
59545954
def test_unistd_dup(self):
5955+
if self.node_is_canary and self.get_setting('NODERAWFS'):
5956+
self.skipTest('https://github.com/emscripten-core/emscripten/issues/22812')
59555957
self.do_run_in_out_file_test('unistd/dup.c')
59565958

59575959
@parameterized({

0 commit comments

Comments
 (0)