From d6b42e585be2bfb17d959908731b02e9e97f5fd9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 15 Dec 2024 19:55:40 -0800 Subject: wasm linker: implement name subsection unlike the previous implementation, we can simply iterate an array. --- src/InternPool.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/InternPool.zig') diff --git a/src/InternPool.zig b/src/InternPool.zig index 7a2e6d8ce3..92fab343a0 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -11801,6 +11801,10 @@ pub fn toEnum(ip: *const InternPool, comptime E: type, i: Index) E { return @enumFromInt(ip.indexToKey(int).int.storage.u64); } +pub fn toFunc(ip: *const InternPool, i: Index) Key.Func { + return ip.indexToKey(i).func; +} + pub fn aggregateTypeLen(ip: *const InternPool, ty: Index) u64 { return switch (ip.indexToKey(ty)) { .struct_type => ip.loadStructType(ty).field_types.len, -- cgit v1.2.3