From fde8c2f41a76f6bc56d733a8cb6aae90f8e3f41b Mon Sep 17 00:00:00 2001 From: Luuk de Gram Date: Wed, 24 Jan 2024 17:24:58 +0100 Subject: wasm: reimplement `deleteDeclExport` Removes the symbol from the decl's list of exports, marks it as dead, as well as appends it to the symbol free list. Also removes it from the list of global symbols as all exports are global. In the future we should perhaps use a map for the export list to prevent linear lookups. But this requires a benchmark as having more than 1 export for the same decl is very rare. --- src/link/Wasm.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/link/Wasm.zig') diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig index 82fa7a9439..98ace9e4ac 100644 --- a/src/link/Wasm.zig +++ b/src/link/Wasm.zig @@ -1534,9 +1534,8 @@ pub fn deleteDeclExport( decl_index: InternPool.DeclIndex, name: InternPool.NullTerminatedString, ) void { - _ = name; if (wasm.llvm_object) |_| return; - return wasm.zigObjectPtr().?.deleteDeclExport(wasm, decl_index); + return wasm.zigObjectPtr().?.deleteDeclExport(wasm, decl_index, name); } pub fn updateExports( -- cgit v1.2.3