InternPool: implement indexToKey for func_instance and func_decl

Also delete incorrect frees an arena-allocated parameters.
This commit is contained in:
Andrew Kelley
2023-07-09 15:31:47 -07:00
parent 4a55fc6c53
commit c193872c81
3 changed files with 64 additions and 26 deletions

View File

@@ -4279,10 +4279,7 @@ fn semaDecl(mod: *Module, decl_index: Decl.Index) !bool {
.inlining = null,
.is_comptime = true,
};
defer {
block_scope.instructions.deinit(gpa);
block_scope.params.deinit(gpa);
}
defer block_scope.instructions.deinit(gpa);
const zir_block_index = decl.zirBlockIndex(mod);
const inst_data = zir_datas[zir_block_index].pl_node;