diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-12-15 19:55:40 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-01-15 15:11:35 -0800 |
| commit | d6b42e585be2bfb17d959908731b02e9e97f5fd9 (patch) | |
| tree | 451c1047861f8526ea34ccc35ba8912aa96574a6 /src/InternPool.zig | |
| parent | e80a2037687343ba18d240c771ff86d6891b5785 (diff) | |
| download | zig-d6b42e585be2bfb17d959908731b02e9e97f5fd9.tar.gz zig-d6b42e585be2bfb17d959908731b02e9e97f5fd9.zip | |
wasm linker: implement name subsection
unlike the previous implementation, we can simply iterate an array.
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 4 |
1 files changed, 4 insertions, 0 deletions
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, |
