diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-03-26 04:06:39 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-03-26 13:48:06 +0000 |
| commit | 26a94e8481385619ae049143dd67e551f333fa3f (patch) | |
| tree | 2106272eed6fb7b15a8309c6fc5137e6fec93234 /src/arch/wasm/CodeGen.zig | |
| parent | 152a2ceaf738301cd59165a4f17d915391321bdc (diff) | |
| download | zig-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/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 11c95e318a..be7f4ab66a 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -3121,7 +3121,6 @@ fn lowerParentPtr(func: *CodeGen, ptr_val: Value, offset: u32) InnerError!WValue fn lowerParentPtrDecl(func: *CodeGen, ptr_val: Value, decl_index: InternPool.DeclIndex, offset: u32) InnerError!WValue { const mod = func.bin_file.base.comp.module.?; const decl = mod.declPtr(decl_index); - try mod.markDeclAlive(decl); const ptr_ty = try mod.singleMutPtrType(decl.typeOf(mod)); return func.lowerDeclRefValue(.{ .ty = ptr_ty, .val = ptr_val }, decl_index, offset); } @@ -3178,7 +3177,6 @@ fn lowerDeclRefValue(func: *CodeGen, tv: TypedValue, decl_index: InternPool.Decl return WValue{ .imm32 = 0xaaaaaaaa }; } - try mod.markDeclAlive(decl); const atom_index = try func.bin_file.getOrCreateAtomForDecl(decl_index); const atom = func.bin_file.getAtom(atom_index); |
