aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-03-26 04:06:39 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-26 13:48:06 +0000
commit26a94e8481385619ae049143dd67e551f333fa3f (patch)
tree2106272eed6fb7b15a8309c6fc5137e6fec93234 /src/codegen.zig
parent152a2ceaf738301cd59165a4f17d915391321bdc (diff)
downloadzig-26a94e8481385619ae049143dd67e551f333fa3f.tar.gz
zig-26a94e8481385619ae049143dd67e551f333fa3f.zip
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`.
Diffstat (limited to 'src/codegen.zig')
-rw-r--r--src/codegen.zig4
1 files changed, 0 insertions, 4 deletions
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;