From 9a738c0be54c9bda0e57de9da84f86fc73bd5198 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Fri, 26 May 2023 00:24:29 -0400 Subject: 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. --- src/codegen/spirv.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen/spirv.zig') diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig index 1a19bbdf91..43b6741493 100644 --- a/src/codegen/spirv.zig +++ b/src/codegen/spirv.zig @@ -256,7 +256,7 @@ pub const DeclGen = struct { /// Note: Function does not actually generate the decl. fn resolveDecl(self: *DeclGen, decl_index: Module.Decl.Index) !SpvModule.Decl.Index { const decl = self.module.declPtr(decl_index); - self.module.markDeclAlive(decl); + try self.module.markDeclAlive(decl); const entry = try self.decl_link.getOrPut(decl_index); if (!entry.found_existing) { -- cgit v1.2.3