aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-01-09 18:40:01 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-01-15 15:11:36 -0800
commit1c4b4fb51604f388bb4355e566aac4ea9fda8960 (patch)
tree65ec97db826dce98ce9bfa63287691ff913c6310 /src/arch/wasm/CodeGen.zig
parentd9d49ce995c555286ba4f6041bcca12477f37296 (diff)
downloadzig-1c4b4fb51604f388bb4355e566aac4ea9fda8960.tar.gz
zig-1c4b4fb51604f388bb4355e566aac4ea9fda8960.zip
implement indirect function table for object functions
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 8d70103d1f..4023658742 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -1027,7 +1027,7 @@ fn emitWValue(cg: *CodeGen, value: WValue) InnerError!void {
const ip = &zcu.intern_pool;
if (ip.getNav(nav_ref.nav_index).isExternOrFn(ip)) {
assert(nav_ref.offset == 0);
- const gop = try wasm.indirect_function_table.getOrPut(comp.gpa, nav_ref.nav_index);
+ const gop = try wasm.zcu_indirect_function_set.getOrPut(comp.gpa, nav_ref.nav_index);
if (!gop.found_existing) gop.value_ptr.* = {};
try cg.addInst(.{
.tag = .func_ref,
@@ -1056,7 +1056,7 @@ fn emitWValue(cg: *CodeGen, value: WValue) InnerError!void {
if (ip.isFunctionType(ip.typeOf(uav.ip_index))) {
assert(uav.offset == 0);
const owner_nav = ip.toFunc(uav.ip_index).owner_nav;
- const gop = try wasm.indirect_function_table.getOrPut(comp.gpa, owner_nav);
+ const gop = try wasm.zcu_indirect_function_set.getOrPut(comp.gpa, owner_nav);
if (!gop.found_existing) gop.value_ptr.* = {};
try cg.addInst(.{
.tag = .func_ref,