From 26a94e8481385619ae049143dd67e551f333fa3f Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 26 Mar 2024 04:06:39 +0000 Subject: Zcu: eliminate `Decl.alive` field Legacy anon decls now have three uses: * Type owner decls * Function owner decls * `@export` and `@extern` Therefore, there are no longer any cases where we wish to explicitly omit legacy anon decls from the binary. This means we can remove the concept of an "alive" vs "dead" `Decl`, which also allows us to remove the separate `anon_work_queue` in `Compilation`. --- src/codegen.zig | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/codegen.zig') diff --git a/src/codegen.zig b/src/codegen.zig index 818284a8f0..48a7f840b2 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -835,8 +835,6 @@ fn lowerDeclRef( return Result.ok; } - try zcu.markDeclAlive(decl); - const vaddr = try lf.getDeclVAddr(decl_index, .{ .parent_atom_index = reloc_info.parent_atom_index, .offset = code.items.len, @@ -958,8 +956,6 @@ fn genDeclRef( } } - try zcu.markDeclAlive(decl); - const decl_namespace = zcu.namespacePtr(decl.src_namespace); const single_threaded = decl_namespace.file_scope.mod.single_threaded; const is_threadlocal = tv.val.isPtrToThreadLocal(zcu) and !single_threaded; -- cgit v1.2.3