From 3e03324fa88d4364dddff092aa1e5a9e8deaa51b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 27 Dec 2023 09:34:31 +0000 Subject: Update to node 20 --- run-wasm.js | 2 ++ runtime/src/gc.c | 7 ------- 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() -- cgit v1.2.3