diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-27 09:34:31 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-27 09:35:03 +0000 |
| commit | 3e03324fa88d4364dddff092aa1e5a9e8deaa51b (patch) | |
| tree | 6d72f78e6831454063b450c089d6e628969d805b | |
| parent | 4e9724ce88569a70f21ecf83470cb13961bb29d3 (diff) | |
Update to node 20
| -rw-r--r-- | run-wasm.js | 2 | ||||
| -rw-r--r-- | runtime/src/gc.c | 7 | ||||
| -rw-r--r-- | src/test/java/org/shedlang/compiler/backends/wasm/WasmTesting.java | 1 |
3 files changed, 2 insertions, 8 deletions
diff --git a/run-wasm.js b/run-wasm.js index f31964e2..b1485f80 100644 --- a/run-wasm.js +++ b/run-wasm.js @@ -4,8 +4,10 @@ const fs = require("fs"); const {WASI} = require("wasi"); const wasi = new WASI({ + version: "preview1", args: process.argv.slice(2), env: process.env, + returnOnExit: false, }); const importObject = {"wasi_snapshot_preview1": wasi.wasiImport}; diff --git a/runtime/src/gc.c b/runtime/src/gc.c index 26c1c204..dc8c719b 100644 --- a/runtime/src/gc.c +++ b/runtime/src/gc.c @@ -87,18 +87,11 @@ void* shed__runtime__gc_alloc(size_t size, size_t children_offset, size_t childr object->children_offset = children_offset; object->children_count = children_count; -#ifdef __WASM64__ - for (size_t child_offset = 0; child_offset < sizeof(void*) * children_count; child_offset++) { - char* ptr = ((void*) object) + children_offset + child_offset; - *ptr = 0; - } -#else __builtin_memset( ((void*) object) + children_offset, 0, sizeof(void*) * children_count ); -#endif // TODO: is it possible to leave adding the root to the caller, and avoid // having to add so many roots? (Since some values will immediately become a diff --git a/src/test/java/org/shedlang/compiler/backends/wasm/WasmTesting.java b/src/test/java/org/shedlang/compiler/backends/wasm/WasmTesting.java index b68ef0bc..d3154ec9 100644 --- a/src/test/java/org/shedlang/compiler/backends/wasm/WasmTesting.java +++ b/src/test/java/org/shedlang/compiler/backends/wasm/WasmTesting.java @@ -13,7 +13,6 @@ public class WasmTesting { return P.vector( "node", "--experimental-wasi-unstable-preview1", - "--experimental-wasm-eh", "--no-warnings=ExperimentalWarning" ).plusAll(target.nodeFlags()).plus( ShedCompilerFiles.getRoot().resolve("run-wasm.js").toString() |
