diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 14:33:46 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 14:42:50 -0400 |
| commit | afa66fa392f5a32d16da7f4705c59dad369f6d48 (patch) | |
| tree | 4872284bc454b34c14f25559ea46ea9bd6bf2deb /src/Sema.zig | |
| parent | f290b54f891a67af456529da0f4f824a1e27b4ef (diff) | |
| download | zig-afa66fa392f5a32d16da7f4705c59dad369f6d48.tar.gz zig-afa66fa392f5a32d16da7f4705c59dad369f6d48.zip | |
InternPool: make `tracked_insts` thread-safe
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 1c48516476..3bcc830f8c 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -835,12 +835,11 @@ pub const Block = struct { } fn trackZir(block: *Block, inst: Zir.Inst.Index) Allocator.Error!InternPool.TrackedInst.Index { - const sema = block.sema; - const gpa = sema.gpa; - const zcu = sema.pt.zcu; - const ip = &zcu.intern_pool; - const file_index = block.getFileScopeIndex(zcu); - return ip.trackZir(gpa, file_index, inst); + const pt = block.sema.pt; + return pt.zcu.intern_pool.trackZir(pt.zcu.gpa, pt.tid, .{ + .file = block.getFileScopeIndex(pt.zcu), + .inst = inst, + }); } }; |
