| ... | ... | @@ -279,8 +279,6 @@ pub const Function = struct { |
| 279 | 279 | /// by type alignment. |
| 280 | 280 | /// The value is whether the alloc needs to be emitted in the header. |
| 281 | 281 | allocs: std.AutoArrayHashMapUnmanaged(LocalIndex, bool) = .{}, |
| 282 | | /// Needed for memory used by the keys of free_locals_map entries. |
| 283 | | arena: std.heap.ArenaAllocator, |
| 284 | 282 | |
| 285 | 283 | fn resolveInst(f: *Function, ref: Air.Inst.Ref) !CValue { |
| 286 | 284 | if (Air.refToIndex(ref)) |inst| { |
| ... | ... | @@ -481,7 +479,6 @@ pub const Function = struct { |
| 481 | 479 | f.object.code.deinit(); |
| 482 | 480 | f.object.dg.ctypes.deinit(gpa); |
| 483 | 481 | f.object.dg.fwd_decl.deinit(); |
| 484 | | f.arena.deinit(); |
| 485 | 482 | } |
| 486 | 483 | }; |
| 487 | 484 | |
| ... | ... | @@ -3396,7 +3393,7 @@ fn airRet(f: *Function, inst: Air.Inst.Index, is_ptr: bool) !CValue { |
| 3396 | 3393 | var deref = is_ptr; |
| 3397 | 3394 | const is_array = lowersToArray(ret_ty, target); |
| 3398 | 3395 | const ret_val = if (is_array) ret_val: { |
| 3399 | | const array_local = try f.allocLocal(inst, try lowered_ret_ty.copy(f.arena.allocator())); |
| 3396 | const array_local = try f.allocLocal(inst, lowered_ret_ty); |
| 3400 | 3397 | try writer.writeAll("memcpy("); |
| 3401 | 3398 | try f.writeCValueMember(writer, array_local, .{ .identifier = "array" }); |
| 3402 | 3399 | try writer.writeAll(", "); |
| ... | ... | @@ -4113,7 +4110,7 @@ fn airCall( |
| 4113 | 4110 | var lowered_arg_buf: LowerFnRetTyBuffer = undefined; |
| 4114 | 4111 | const lowered_arg_ty = lowerFnRetTy(arg_ty, &lowered_arg_buf, target); |
| 4115 | 4112 | |
| 4116 | | const array_local = try f.allocLocal(inst, try lowered_arg_ty.copy(f.arena.allocator())); |
| 4113 | const array_local = try f.allocLocal(inst, lowered_arg_ty); |
| 4117 | 4114 | try writer.writeAll("memcpy("); |
| 4118 | 4115 | try f.writeCValueMember(writer, array_local, .{ .identifier = "array" }); |
| 4119 | 4116 | try writer.writeAll(", "); |
| ... | ... | @@ -4156,7 +4153,7 @@ fn airCall( |
| 4156 | 4153 | try writer.writeByte(')'); |
| 4157 | 4154 | break :result .none; |
| 4158 | 4155 | } else { |
| 4159 | | const local = try f.allocLocal(inst, try lowered_ret_ty.copy(f.arena.allocator())); |
| 4156 | const local = try f.allocLocal(inst, lowered_ret_ty); |
| 4160 | 4157 | try f.writeCValue(writer, local, .Other); |
| 4161 | 4158 | try writer.writeAll(" = "); |
| 4162 | 4159 | break :result local; |
| ... | ... | @@ -5363,7 +5360,7 @@ fn airStructFieldVal(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5363 | 5360 | }; |
| 5364 | 5361 | const field_int_ty = Type.initPayload(&field_int_pl.base); |
| 5365 | 5362 | |
| 5366 | | const temp_local = try f.allocLocal(inst, try field_int_ty.copy(f.arena.allocator())); |
| 5363 | const temp_local = try f.allocLocal(inst, field_int_ty); |
| 5367 | 5364 | try f.writeCValue(writer, temp_local, .Other); |
| 5368 | 5365 | try writer.writeAll(" = zig_wrap_"); |
| 5369 | 5366 | try f.object.dg.renderTypeForBuiltinFnName(writer, field_int_ty); |