aboutsummaryrefslogtreecommitdiff
path: root/src/link/Wasm.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-06-15 19:57:47 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-07 22:59:52 -0400
commitca02266157ee72e41068672c8ca6f928fcbf6fdf (patch)
treed827ad6e5d0d311c4fca7fa83a32a98d3d201ac4 /src/link/Wasm.zig
parent525f341f33af9b8aad53931fd5511f00a82cb090 (diff)
downloadzig-ca02266157ee72e41068672c8ca6f928fcbf6fdf.tar.gz
zig-ca02266157ee72e41068672c8ca6f928fcbf6fdf.zip
Zcu: pass `PerThread` to intern pool string functions
Diffstat (limited to 'src/link/Wasm.zig')
-rw-r--r--src/link/Wasm.zig11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig
index 4e661e33e4..32af004132 100644
--- a/src/link/Wasm.zig
+++ b/src/link/Wasm.zig
@@ -1457,9 +1457,9 @@ pub fn updateDecl(wasm: *Wasm, pt: Zcu.PerThread, decl_index: InternPool.DeclInd
try wasm.zigObjectPtr().?.updateDecl(wasm, pt, decl_index);
}
-pub fn updateDeclLineNumber(wasm: *Wasm, mod: *Zcu, decl_index: InternPool.DeclIndex) !void {
+pub fn updateDeclLineNumber(wasm: *Wasm, pt: Zcu.PerThread, decl_index: InternPool.DeclIndex) !void {
if (wasm.llvm_object) |_| return;
- try wasm.zigObjectPtr().?.updateDeclLineNumber(mod, decl_index);
+ try wasm.zigObjectPtr().?.updateDeclLineNumber(pt, decl_index);
}
/// From a given symbol location, returns its `wasm.GlobalType`.
@@ -1521,10 +1521,11 @@ pub fn getGlobalSymbol(wasm: *Wasm, name: []const u8, lib_name: ?[]const u8) !Sy
/// Returns the given pointer address
pub fn getDeclVAddr(
wasm: *Wasm,
+ pt: Zcu.PerThread,
decl_index: InternPool.DeclIndex,
reloc_info: link.File.RelocInfo,
) !u64 {
- return wasm.zigObjectPtr().?.getDeclVAddr(wasm, decl_index, reloc_info);
+ return wasm.zigObjectPtr().?.getDeclVAddr(wasm, pt, decl_index, reloc_info);
}
pub fn lowerAnonDecl(
@@ -4016,8 +4017,8 @@ pub fn getErrorTableSymbol(wasm_file: *Wasm, pt: Zcu.PerThread) !u32 {
/// For a given `InternPool.DeclIndex` returns its corresponding `Atom.Index`.
/// When the index was not found, a new `Atom` will be created, and its index will be returned.
/// The newly created Atom is empty with default fields as specified by `Atom.empty`.
-pub fn getOrCreateAtomForDecl(wasm_file: *Wasm, decl_index: InternPool.DeclIndex) !Atom.Index {
- return wasm_file.zigObjectPtr().?.getOrCreateAtomForDecl(wasm_file, decl_index);
+pub fn getOrCreateAtomForDecl(wasm_file: *Wasm, pt: Zcu.PerThread, decl_index: InternPool.DeclIndex) !Atom.Index {
+ return wasm_file.zigObjectPtr().?.getOrCreateAtomForDecl(wasm_file, pt, decl_index);
}
/// Verifies all resolved symbols and checks whether itself needs to be marked alive,