aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2024-01-24 16:52:46 +0100
committerLuuk de Gram <luuk@degram.dev>2024-02-29 15:23:04 +0100
commit8f96e7eec1b2af005e17bf21f91fc91add92d7dd (patch)
tree700d2e8440f4a111e5ad5687335124bc8f0a2010 /src/arch/wasm/CodeGen.zig
parenta028b10b9f8213f5f31c06b57cd18f9852f0df13 (diff)
downloadzig-8f96e7eec1b2af005e17bf21f91fc91add92d7dd.tar.gz
zig-8f96e7eec1b2af005e17bf21f91fc91add92d7dd.zip
wasm: re-implement `updateExports`
We now correctly create a symbol for each exported decl with its export- name. The symbol points to the same linker-object. We store a map from decl to all of its exports so we can update exports if it already exists rather than infinitely create new exports.
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 314518caef..5440147296 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -2239,7 +2239,7 @@ fn airCall(func: *CodeGen, inst: Air.Inst.Index, modifier: std.builtin.CallModif
}
if (callee) |direct| {
- const atom_index = func.bin_file.zigObjectPtr().?.decls.get(direct).?;
+ const atom_index = func.bin_file.zigObjectPtr().?.decls_map.get(direct).?.atom;
try func.addLabel(.call, func.bin_file.getAtom(atom_index).sym_index);
} else {
// in this case we call a function pointer