From cda716ecc43929fd1c2c9679335b8b22f1b67d1a Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Sat, 15 Jun 2024 16:18:41 -0400 Subject: InternPool: implement thread-safe hash map --- src/Compilation.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 1f4c425bc5..7e10febf0e 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1397,7 +1397,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil .error_limit = error_limit, .llvm_object = null, }; - try zcu.init(); + try zcu.init(options.thread_pool.getIdCount()); break :blk zcu; } else blk: { if (options.emit_h != null) return error.NoZigModuleForCHeader; @@ -2156,7 +2156,7 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) !void { if (build_options.enable_debug_extensions and comp.verbose_generic_instances) { std.debug.print("generic instances for '{s}:0x{x}':\n", .{ comp.root_name, - @as(usize, @intFromPtr(zcu)), + @intFromPtr(zcu), }); zcu.intern_pool.dumpGenericInstances(gpa); } -- cgit v1.2.3