From c0df70706695a67089d4e691d3d3a0f77b90298f Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 3 Jun 2025 16:25:16 +0100 Subject: wasm: get self-hosted compiling, and supporting `separate_thread` My original goal here was just to get the self-hosted Wasm backend compiling again after the pipeline change, but it turned out that from there it was pretty simple to entirely eliminate the shared state between `codegen.wasm` and `link.Wasm`. As such, this commit not only fixes the backend, but makes it the second backend (after CBE) to support the new 1:N:1 threading model. --- src/Compilation.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index e967935539..0342566e27 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3500,7 +3500,7 @@ pub fn saveState(comp: *Compilation) !void { // TODO handle the union safety field //addBuf(&bufs, mem.sliceAsBytes(wasm.mir_instructions.items(.data))); addBuf(&bufs, mem.sliceAsBytes(wasm.mir_extra.items)); - addBuf(&bufs, mem.sliceAsBytes(wasm.all_zcu_locals.items)); + addBuf(&bufs, mem.sliceAsBytes(wasm.mir_locals.items)); addBuf(&bufs, mem.sliceAsBytes(wasm.tag_name_bytes.items)); addBuf(&bufs, mem.sliceAsBytes(wasm.tag_name_offs.items)); -- cgit v1.2.3