diff options
| author | Luuk de Gram <luuk@degram.dev> | 2024-01-24 17:24:58 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2024-02-29 15:23:04 +0100 |
| commit | fde8c2f41a76f6bc56d733a8cb6aae90f8e3f41b (patch) | |
| tree | 742d36a6ee82580107b0e1f7f8e5fa9fbe225863 /src/link/Wasm.zig | |
| parent | 8f96e7eec1b2af005e17bf21f91fc91add92d7dd (diff) | |
| download | zig-fde8c2f41a76f6bc56d733a8cb6aae90f8e3f41b.tar.gz zig-fde8c2f41a76f6bc56d733a8cb6aae90f8e3f41b.zip | |
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.
Diffstat (limited to 'src/link/Wasm.zig')
| -rw-r--r-- | src/link/Wasm.zig | 3 |
1 files changed, 1 insertions, 2 deletions
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( |
