authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-05-20 15:52:28-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-10 20:47:53-07:00
log65d65f5dda144d76ea9bbd82b2b5aacb09d7ae34
treeeb3251a2baa0521f5c924432cb4f907acab64b29
parentdfb3521160eb4397b7482de68796d370230a8d11

Module: remove tmp_hack_arena

This was only needed when pointers were not fully migrated to InternPool yet.

2 files changed, 0 insertions(+), 6 deletions(-)

src/Compilation.zig-1
...@@ -1316,7 +1316,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {...@@ -1316,7 +1316,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
1316 .local_zir_cache = local_zir_cache,1316 .local_zir_cache = local_zir_cache,
1317 .emit_h = emit_h,1317 .emit_h = emit_h,
1318 .error_name_list = .{},1318 .error_name_list = .{},
1319 .tmp_hack_arena = std.heap.ArenaAllocator.init(gpa),
1320 };1319 };
1321 try module.init();1320 try module.init();
13221321
src/Module.zig-5
...@@ -98,10 +98,6 @@ string_literal_bytes: ArrayListUnmanaged(u8) = .{},...@@ -98,10 +98,6 @@ string_literal_bytes: ArrayListUnmanaged(u8) = .{},
9898
99/// Stores all Type and Value objects; periodically garbage collected.99/// Stores all Type and Value objects; periodically garbage collected.
100intern_pool: InternPool = .{},100intern_pool: InternPool = .{},
101/// Temporarily used for some unfortunate allocations made by backends that need to construct
102/// pointer types that can't be represented by the InternPool. Once all types are migrated
103/// to be stored in the InternPool, this can be removed.
104tmp_hack_arena: std.heap.ArenaAllocator,
105101
106/// The set of all the generic function instantiations. This is used so that when a generic102/// The set of all the generic function instantiations. This is used so that when a generic
107/// function is called twice with the same comptime parameter arguments, both calls dispatch103/// function is called twice with the same comptime parameter arguments, both calls dispatch
...@@ -3423,7 +3419,6 @@ pub fn deinit(mod: *Module) void {...@@ -3423,7 +3419,6 @@ pub fn deinit(mod: *Module) void {
3423 mod.string_literal_bytes.deinit(gpa);3419 mod.string_literal_bytes.deinit(gpa);
34243420
3425 mod.intern_pool.deinit(gpa);3421 mod.intern_pool.deinit(gpa);
3426 mod.tmp_hack_arena.deinit();
3427}3422}
34283423
3429pub fn destroyDecl(mod: *Module, decl_index: Decl.Index) void {3424pub fn destroyDecl(mod: *Module, decl_index: Decl.Index) void {