diff options
| author | Benjamin Jurk <106487517+bnjmnjrk@users.noreply.github.com> | 2025-11-20 23:46:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-20 14:46:23 -0800 |
| commit | 4b5351bc0ddc248d6935d7d160a57cb4dfe4dedd (patch) | |
| tree | 8ce84d4e44a8ee1abaf0ef71d8287cec4b0f8c0a /src/codegen/spirv | |
| parent | db622f14c445b4f55981636543c546e22346abd5 (diff) | |
| download | zig-4b5351bc0ddc248d6935d7d160a57cb4dfe4dedd.tar.gz zig-4b5351bc0ddc248d6935d7d160a57cb4dfe4dedd.zip | |
update deprecated ArrayListUnmanaged usage (#25958)
Diffstat (limited to 'src/codegen/spirv')
| -rw-r--r-- | src/codegen/spirv/Assembler.zig | 8 | ||||
| -rw-r--r-- | src/codegen/spirv/CodeGen.zig | 14 | ||||
| -rw-r--r-- | src/codegen/spirv/Module.zig | 4 | ||||
| -rw-r--r-- | src/codegen/spirv/Section.zig | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/src/codegen/spirv/Assembler.zig b/src/codegen/spirv/Assembler.zig index a47cd49644..5b19f960a7 100644 --- a/src/codegen/spirv/Assembler.zig +++ b/src/codegen/spirv/Assembler.zig @@ -14,16 +14,16 @@ const StorageClass = spec.StorageClass; const Assembler = @This(); cg: *CodeGen, -errors: std.ArrayListUnmanaged(ErrorMsg) = .empty, +errors: std.ArrayList(ErrorMsg) = .empty, src: []const u8 = undefined, /// `ass.src` tokenized. -tokens: std.ArrayListUnmanaged(Token) = .empty, +tokens: std.ArrayList(Token) = .empty, current_token: u32 = 0, /// The instruction that is currently being parsed or has just been parsed. inst: struct { opcode: Opcode = undefined, - operands: std.ArrayListUnmanaged(Operand) = .empty, - string_bytes: std.ArrayListUnmanaged(u8) = .empty, + operands: std.ArrayList(Operand) = .empty, + string_bytes: std.ArrayList(u8) = .empty, fn result(ass: @This()) ?AsmValue.Ref { for (ass.operands.items[0..@min(ass.operands.items.len, 2)]) |op| { diff --git a/src/codegen/spirv/CodeGen.zig b/src/codegen/spirv/CodeGen.zig index 20aad56225..c34dd96e25 100644 --- a/src/codegen/spirv/CodeGen.zig +++ b/src/codegen/spirv/CodeGen.zig @@ -83,7 +83,7 @@ const ControlFlow = union(enum) { selection: struct { /// In order to know which merges we still need to do, we need to keep /// a stack of those. - merge_stack: std.ArrayListUnmanaged(SelectionMerge) = .empty, + merge_stack: std.ArrayList(SelectionMerge) = .empty, }, /// For a `loop` type block, we can early-exit the block by /// jumping to the loop exit node, and we don't need to generate @@ -91,7 +91,7 @@ const ControlFlow = union(enum) { loop: struct { /// The next block to jump to can be determined from any number /// of conditions that jump to the loop exit. - merges: std.ArrayListUnmanaged(Incoming) = .empty, + merges: std.ArrayList(Incoming) = .empty, /// The label id of the loop's merge block. merge_block: Id, }, @@ -105,7 +105,7 @@ const ControlFlow = union(enum) { } }; /// This determines how exits from the current block must be handled. - block_stack: std.ArrayListUnmanaged(*Structured.Block) = .empty, + block_stack: std.ArrayList(*Structured.Block) = .empty, block_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, }; @@ -117,7 +117,7 @@ const ControlFlow = union(enum) { const Block = struct { label: ?Id = null, - incoming_blocks: std.ArrayListUnmanaged(Incoming) = .empty, + incoming_blocks: std.ArrayList(Incoming) = .empty, }; /// We need to keep track of result ids for block labels, as well as the 'incoming' @@ -151,9 +151,9 @@ control_flow: ControlFlow, base_line: u32, block_label: Id = .none, next_arg_index: u32 = 0, -args: std.ArrayListUnmanaged(Id) = .empty, +args: std.ArrayList(Id) = .empty, inst_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, -id_scratch: std.ArrayListUnmanaged(Id) = .empty, +id_scratch: std.ArrayList(Id) = .empty, prologue: Section = .{}, body: Section = .{}, error_msg: ?*Zcu.ErrorMsg = null, @@ -5783,7 +5783,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index) !void { } } - var incoming_structured_blocks: std.ArrayListUnmanaged(ControlFlow.Structured.Block.Incoming) = .empty; + var incoming_structured_blocks: std.ArrayList(ControlFlow.Structured.Block.Incoming) = .empty; defer incoming_structured_blocks.deinit(gpa); if (cg.control_flow == .structured) { diff --git a/src/codegen/spirv/Module.zig b/src/codegen/spirv/Module.zig index 3189a422f8..6b6c1f0ab3 100644 --- a/src/codegen/spirv/Module.zig +++ b/src/codegen/spirv/Module.zig @@ -26,8 +26,8 @@ zcu: *Zcu, nav_link: std.AutoHashMapUnmanaged(InternPool.Nav.Index, Decl.Index) = .empty, uav_link: std.AutoHashMapUnmanaged(struct { InternPool.Index, spec.StorageClass }, Decl.Index) = .empty, intern_map: std.AutoHashMapUnmanaged(struct { InternPool.Index, Repr }, Id) = .empty, -decls: std.ArrayListUnmanaged(Decl) = .empty, -decl_deps: std.ArrayListUnmanaged(Decl.Index) = .empty, +decls: std.ArrayList(Decl) = .empty, +decl_deps: std.ArrayList(Decl.Index) = .empty, entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty, /// This map serves a dual purpose: /// - It keeps track of pointers that are currently being emitted, so that we can tell diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig index d5748afa39..5059b2c866 100644 --- a/src/codegen/spirv/Section.zig +++ b/src/codegen/spirv/Section.zig @@ -13,7 +13,7 @@ const Log2Word = std.math.Log2Int(Word); const Opcode = spec.Opcode; -instructions: std.ArrayListUnmanaged(Word) = .empty, +instructions: std.ArrayList(Word) = .empty, pub fn deinit(section: *Section, allocator: Allocator) void { section.instructions.deinit(allocator); |
