Module: intern the values of decls when they are marked alive

I'm not sure if this is the right place for this to happen, and
it should become obsolete when comptime mutation is rewritten
and the remaining legacy value tags are remove, so keeping this
as a separate revertable commit.
This commit is contained in:
Jacob Young
2023-05-26 00:24:29 -04:00
committed by Andrew Kelley
parent f37c0a4593
commit 9a738c0be5
7 changed files with 29 additions and 27 deletions

View File

@@ -673,7 +673,7 @@ fn lowerDeclRef(
return Result.ok;
}
mod.markDeclAlive(decl);
try mod.markDeclAlive(decl);
const vaddr = try bin_file.getDeclVAddr(decl_index, .{
.parent_atom_index = reloc_info.parent_atom_index,
@@ -782,7 +782,7 @@ fn genDeclRef(
}
}
mod.markDeclAlive(decl);
try mod.markDeclAlive(decl);
const is_threadlocal = tv.val.isPtrToThreadLocal(mod) and !bin_file.options.single_threaded;