From c193872c814ab2c9fefcc884782301157ba8c29e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 9 Jul 2023 15:31:47 -0700 Subject: InternPool: implement indexToKey for func_instance and func_decl Also delete incorrect frees an arena-allocated parameters. --- src/Sema.zig | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/Sema.zig') diff --git a/src/Sema.zig b/src/Sema.zig index 9cd6acfc60..d8c55e5aeb 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -34063,10 +34063,7 @@ fn semaStructFields(mod: *Module, struct_obj: *Module.Struct) CompileError!void .inlining = null, .is_comptime = true, }; - defer { - assert(block_scope.instructions.items.len == 0); - block_scope.params.deinit(gpa); - } + defer assert(block_scope.instructions.items.len == 0); struct_obj.fields = .{}; try struct_obj.fields.ensureTotalCapacity(mod.tmp_hack_arena.allocator(), fields_len); @@ -34409,10 +34406,7 @@ fn semaUnionFields(mod: *Module, union_obj: *Module.Union) CompileError!void { .inlining = null, .is_comptime = true, }; - defer { - assert(block_scope.instructions.items.len == 0); - block_scope.params.deinit(gpa); - } + defer assert(block_scope.instructions.items.len == 0); if (body.len != 0) { try sema.analyzeBody(&block_scope, body); -- cgit v1.2.3