diff --git a/lib/compiler/aro/backend/Ir/x86/Renderer.zig b/lib/compiler/aro/backend/Ir/x86/Renderer.zig index 0726e638566074a0abadb726a3cecc9b2cac8309..dec454c000f8366a30f6a1661a81bc1038876742 100644 --- a/lib/compiler/aro/backend/Ir/x86/Renderer.zig +++ b/lib/compiler/aro/backend/Ir/x86/Renderer.zig @@ -21,17 +21,17 @@ const RegisterManager = zig.RegisterManager(Renderer, Register, Ir.Ref, abi.allo const RegisterBitSet = RegisterManager.RegisterBitSet; const RegisterClass = struct { const gp: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .general_purpose) set.set(index); break :blk set; }; const x87: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .x87) set.set(index); break :blk set; }; const sse: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .sse) set.set(index); break :blk set; }; diff --git a/lib/compiler/resinator/compile.zig b/lib/compiler/resinator/compile.zig index e891e3f5aaa72f0dd703ae06710be8a60bb545a9..9686dfa7148521f654d48c4380a848b10f507ada 100644 --- a/lib/compiler/resinator/compile.zig +++ b/lib/compiler/resinator/compile.zig @@ -2746,7 +2746,7 @@ pub const Compiler = struct { // 1. Any permutation that does not have PRELOAD in it just uses the // default flags. const initial_flags = flags.*; - var flags_set = std.enums.EnumSet(rc.CommonResourceAttributes).initEmpty(); + var flags_set = std.enums.EnumSet(rc.CommonResourceAttributes).empty; for (tokens) |token| { const attribute = rc.CommonResourceAttributes.map.get(token.slice(source)).?; flags_set.insert(attribute); @@ -2769,7 +2769,7 @@ pub const Compiler = struct { // 3. If none of DISCARDABLE, SHARED, or PURE is specified, then PRELOAD // implies `flags &= ~SHARED` and LOADONCALL implies `flags |= SHARED` const shared_set = comptime blk: { - var set = std.enums.EnumSet(rc.CommonResourceAttributes).initEmpty(); + var set = std.enums.EnumSet(rc.CommonResourceAttributes).empty; set.insert(.discardable); set.insert(.shared); set.insert(.pure); diff --git a/lib/std/Io/Kqueue.zig b/lib/std/Io/Kqueue.zig index 1c16263069b2f78852498bf56d66e0bfae626cda..91d1887dd2bac564adc352bb8b8aeda9c346d2d7 100644 --- a/lib/std/Io/Kqueue.zig +++ b/lib/std/Io/Kqueue.zig @@ -186,7 +186,7 @@ pub fn init(k: *Kqueue, gpa: Allocator, options: InitOptions) !void { .awaiter = null, .queue_next = null, .cancel_thread = null, - .awaiting_completions = .initEmpty(), + .awaiting_completions = .empty, }; const main_thread = &k.threads.allocated[0]; Thread.self = main_thread; @@ -713,7 +713,7 @@ fn concurrent( .awaiter = null, .queue_next = null, .cancel_thread = null, - .awaiting_completions = .initEmpty(), + .awaiting_completions = .empty, }; closure.* = .{ .kqueue = k, diff --git a/lib/std/bit_set.zig b/lib/std/bit_set.zig index edd67e51af3fa3dd709c5269ebeffd3c7741839e..bd2ba3bca296f515cb6655403f32ff3afb46efb1 100644 --- a/lib/std/bit_set.zig +++ b/lib/std/bit_set.zig @@ -68,16 +68,24 @@ pub fn IntegerBitSet(comptime size: u16) type { /// The bit mask, as a single integer mask: MaskInt, + /// Deprecated: use `.empty`. /// Creates a bit set with no elements present. pub fn initEmpty() Self { return .{ .mask = 0 }; } + /// Deprecated: use `.full`. /// Creates a bit set with all elements present. pub fn initFull() Self { return .{ .mask = ~@as(MaskInt, 0) }; } + /// A bit set with no elements present. + pub const empty: Self = .{ .mask = 0 }; + + /// A bit set with all elements present. + pub const full: Self = .{ .mask = ~@as(MaskInt, 0) }; + /// Returns the number of bits in this bit set pub inline fn capacity(self: Self) usize { _ = self; @@ -387,11 +395,13 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type { /// Padding bits at the end are undefined. masks: [num_masks]MaskInt, + /// Deprecated: use `.empty`. /// Creates a bit set with no elements present. pub fn initEmpty() Self { return .{ .masks = [_]MaskInt{0} ** num_masks }; } + /// Deprecated: use `.full`. /// Creates a bit set with all elements present. pub fn initFull() Self { if (num_masks == 0) { @@ -401,6 +411,12 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type { } } + /// A bit set with no elements present. + pub const empty: Self = .{ .masks = @splat(0) }; + + /// A bit set with all elements present. + pub const full: Self = .{ .masks = if (num_masks == 0) .{} else ([_]MaskInt{~@as(MaskInt, 0)} ** (num_masks - 1) ++ [_]MaskInt{last_item_mask}) }; + /// Returns the number of bits in this bit set pub inline fn capacity(self: Self) usize { _ = self; @@ -1633,17 +1649,17 @@ fn fillOdd(set: anytype, len: usize) void { } fn testPureBitSet(comptime Set: type) !void { - const empty = Set.initEmpty(); - const full = Set.initFull(); + const empty = Set.empty; + const full = Set.full; const even = even: { - var bit_set = Set.initEmpty(); + var bit_set = Set.empty; fillEven(&bit_set, Set.bit_length); break :even bit_set; }; const odd = odd: { - var bit_set = Set.initEmpty(); + var bit_set = Set.empty; fillOdd(&bit_set, Set.bit_length); break :odd bit_set; }; @@ -1686,8 +1702,8 @@ fn testPureBitSet(comptime Set: type) !void { } fn testStaticBitSet(comptime Set: type) !void { - var a = Set.initEmpty(); - var b = Set.initFull(); + var a = Set.empty; + var b = Set.full; try testing.expectEqual(@as(usize, 0), a.count()); try testing.expectEqual(@as(usize, Set.bit_length), b.count()); diff --git a/lib/std/crypto/codecs/base64_hex_ct.zig b/lib/std/crypto/codecs/base64_hex_ct.zig index 0985426d853ea34aed8ef715c1ba5908fa6bb787..89735d40c2b557d6ca02b237adae073aaf1e1e3f 100644 --- a/lib/std/crypto/codecs/base64_hex_ct.zig +++ b/lib/std/crypto/codecs/base64_hex_ct.zig @@ -93,7 +93,7 @@ pub const hex = struct { /// The decoder will skip any characters that are in the ignore list. /// The ignore list must not contain any valid hexadecimal characters. pub fn decoderWithIgnore(ignore_chars: []const u8) error{InvalidCharacter}!DecoderWithIgnore { - var ignored_chars = StaticBitSet(256).initEmpty(); + var ignored_chars = StaticBitSet(256).empty; for (ignore_chars) |c| { switch (c) { '0'...'9', 'a'...'f', 'A'...'F' => return error.InvalidCharacter, @@ -269,7 +269,7 @@ pub const base64 = struct { /// Creates a new decoder that ignores certain characters. pub fn decoderWithIgnore(ignore_chars: []const u8) error{InvalidCharacter}!DecoderWithIgnore { - var ignored_chars = StaticBitSet(256).initEmpty(); + var ignored_chars = StaticBitSet(256).empty; for (ignore_chars) |c| { switch (c) { 'A'...'Z', 'a'...'z', '0'...'9' => return error.InvalidCharacter, diff --git a/lib/std/enums.zig b/lib/std/enums.zig index 406869082e0bd039c1b8bf3a8003047bc1e42a17..2fafb599def3c01bd81e4be41066789afd06a459 100644 --- a/lib/std/enums.zig +++ b/lib/std/enums.zig @@ -252,7 +252,7 @@ pub fn EnumSet(comptime E: type) type { /// The maximum number of items in this set. pub const len = Indexer.count; - bits: BitSet = BitSet.initEmpty(), + bits: BitSet = .empty, /// Initializes the set using a struct of bools pub fn init(init_values: EnumFieldStruct(E, bool, false)) Self { @@ -278,19 +278,15 @@ pub fn EnumSet(comptime E: type) type { return result; } - /// Returns a set containing no keys. - pub fn initEmpty() Self { - return .{ .bits = BitSet.initEmpty() }; - } + /// A set containing no keys. + pub const empty: Self = .{ .bits = .empty }; - /// Returns a set containing all possible keys. - pub fn initFull() Self { - return .{ .bits = BitSet.initFull() }; - } + /// A set containing all possible keys. + pub const full: Self = .{ .bits = .full }; /// Returns a set containing multiple keys. pub fn initMany(keys: []const Key) Self { - var set = initEmpty(); + var set: Self = .empty; for (keys) |key| set.insert(key); return set; } @@ -440,7 +436,7 @@ pub fn EnumMap(comptime E: type, comptime V: type) type { const BitSet = std.StaticBitSet(Indexer.count); /// Bits determining whether items are in the map - bits: BitSet = BitSet.initEmpty(), + bits: BitSet = .empty, /// Values of items in the map. If the associated /// bit is zero, the value is undefined. values: [Indexer.count]Value = undefined, @@ -475,7 +471,7 @@ pub fn EnumMap(comptime E: type, comptime V: type) type { /// Consider using EnumArray instead if the map will remain full. pub fn initFull(value: Value) Self { var result: Self = .{ - .bits = Self.BitSet.initFull(), + .bits = .full, .values = undefined, }; @memset(&result.values, value); @@ -493,7 +489,7 @@ pub fn EnumMap(comptime E: type, comptime V: type) type { pub fn initFullWithDefault(comptime default: ?Value, init_values: EnumFieldStruct(E, Value, default)) Self { @setEvalBranchQuota(2 * @typeInfo(E).@"enum".fields.len); var result: Self = .{ - .bits = Self.BitSet.initFull(), + .bits = .full, .values = undefined, }; inline for (0..Self.len) |i| { @@ -687,16 +683,14 @@ pub fn BoundedEnumMultiset(comptime E: type, comptime CountSize: type) type { return self; } - /// Initializes the multiset with a count of zero. - pub fn initEmpty() Self { - return initWithCount(0); - } + /// A multiset with a count of zero. + pub const empty: Self = .initWithCount(0); /// Initializes the multiset with all keys at the /// same count. pub fn initWithCount(comptime c: CountSize) Self { return .{ - .counts = EnumArray(E, CountSize).initDefault(c, .{}), + .counts = .initDefault(c, .{}), }; } @@ -855,7 +849,7 @@ pub fn BoundedEnumMultiset(comptime E: type, comptime CountSize: type) type { test EnumMultiset { const Ball = enum { red, green, blue }; - const empty = EnumMultiset(Ball).initEmpty(); + const empty = EnumMultiset(Ball).empty; const r0_g1_b2 = EnumMultiset(Ball).init(.{ .red = 0, .green = 1, @@ -1162,8 +1156,8 @@ pub fn EnumArray(comptime E: type, comptime V: type) type { test "pure EnumSet fns" { const Suit = enum { spades, hearts, clubs, diamonds }; - const empty = EnumSet(Suit).initEmpty(); - const full = EnumSet(Suit).initFull(); + const empty = EnumSet(Suit).empty; + const full = EnumSet(Suit).full; const black = EnumSet(Suit).initMany(&[_]Suit{ .spades, .clubs }); const red = EnumSet(Suit).initMany(&[_]Suit{ .hearts, .diamonds }); @@ -1224,8 +1218,8 @@ test "pure EnumSet fns" { test "EnumSet empty" { const E = enum {}; - const empty = EnumSet(E).initEmpty(); - const full = EnumSet(E).initFull(); + const empty = EnumSet(E).empty; + const full = EnumSet(E).full; try std.testing.expect(empty.eql(full)); try std.testing.expect(empty.complement().eql(full)); @@ -1236,13 +1230,13 @@ test "EnumSet empty" { test "EnumSet const iterator" { const Direction = enum { up, down, left, right }; const diag_move = init: { - var move = EnumSet(Direction).initEmpty(); + var move = EnumSet(Direction).empty; move.insert(.right); move.insert(.up); break :init move; }; - var result = EnumSet(Direction).initEmpty(); + var result = EnumSet(Direction).empty; var it = diag_move.iterator(); while (it.next()) |dir| { result.insert(dir); diff --git a/src/Air/Legalize.zig b/src/Air/Legalize.zig index 01f4c53482b97eb9b2b620b5c967f748ff3d7b9b..333ec534243d026b8049e53bd37ecf31f7209fca 100644 --- a/src/Air/Legalize.zig +++ b/src/Air/Legalize.zig @@ -15,7 +15,7 @@ features: if (switch (dev.env) { } /// `inline` to propagate comptime-known result. inline fn hasAny(_: @This(), comptime features: []const Feature) bool { - return comptime !bootstrap_features.intersectWith(.initMany(features)).eql(.initEmpty()); + return comptime !bootstrap_features.intersectWith(.initMany(features)).eql(.empty); } } else struct { features: *const Features, @@ -28,7 +28,7 @@ features: if (switch (dev.env) { return rt.features.contains(feature); } fn hasAny(rt: @This(), comptime features: []const Feature) bool { - return !rt.features.intersectWith(comptime .initMany(features)).eql(comptime .initEmpty()); + return !rt.features.intersectWith(comptime .initMany(features)).eql(.empty); } }, @@ -276,7 +276,7 @@ pub const Features = std.enums.EnumSet(Feature); pub const Error = std.mem.Allocator.Error; pub fn legalize(air: *Air, pt: Zcu.PerThread, features: *const Features) Error!void { - assert(!features.eql(comptime .initEmpty())); // backend asked to run legalize, but no features were enabled + assert(!features.eql(.empty)); // backend asked to run legalize, but no features were enabled var l: Legalize = .{ .pt = pt, .air_instructions = air.instructions.toMultiArrayList(), diff --git a/src/codegen/aarch64.zig b/src/codegen/aarch64.zig index 2904d36b7f21522b2bb0ca5d2e441dc1b5016aaf..7d23b12f17d4a2bdda0aa99c9db2ef32e79a95a1 100644 --- a/src/codegen/aarch64.zig +++ b/src/codegen/aarch64.zig @@ -46,7 +46,7 @@ pub fn generate( .dom_len = 0, .dom = .empty, - .saved_registers = comptime .initEmpty(), + .saved_registers = .empty, .instructions = .empty, .literals = .empty, .nav_relocs = .empty, diff --git a/src/codegen/aarch64/Assemble.zig b/src/codegen/aarch64/Assemble.zig index e6b2189b7becde90fe35bacda4ede3493b90bbc7..7c8a6a5d7ad580f76fe16ce3f576431d8e0c31fe 100644 --- a/src/codegen/aarch64/Assemble.zig +++ b/src/codegen/aarch64/Assemble.zig @@ -129,7 +129,7 @@ const matchers = matchers: { break :Symbols @Struct(.auto, null, &field_names, &field_types, &@splat(.{})); } = undefined; const Symbol = std.meta.FieldEnum(@TypeOf(instruction.symbols)); - comptime var unused_symbols: std.enums.EnumSet(Symbol) = .initFull(); + comptime var unused_symbols: std.enums.EnumSet(Symbol) = .full; comptime var pattern_as: Assemble = .{ .source = instruction.pattern, .operands = undefined }; inline while (true) { comptime var ct_token_buf: [token_buf_len]u8 = undefined; diff --git a/src/codegen/riscv64/CodeGen.zig b/src/codegen/riscv64/CodeGen.zig index 5ab8bebed44c45d8eeb7aa071fe2d803c1f43839..cea33b7c6638b6702ea0a3cfc5b0e8191a67bdf0 100644 --- a/src/codegen/riscv64/CodeGen.zig +++ b/src/codegen/riscv64/CodeGen.zig @@ -1386,7 +1386,7 @@ fn genBody(func: *Func, body: []const Air.Inst.Index) InnerError!void { const old_air_bookkeeping = func.air_bookkeeping; try func.ensureProcessDeathCapacity(Air.Liveness.bpi); - func.reused_operands = @TypeOf(func.reused_operands).initEmpty(); + func.reused_operands = @TypeOf(func.reused_operands).empty; try func.inst_tracking.ensureUnusedCapacity(func.gpa, 1); const tag = air_tags[@intFromEnum(inst)]; switch (tag) { diff --git a/src/codegen/riscv64/Mir.zig b/src/codegen/riscv64/Mir.zig index 204ab6a3c06226635b1619b60c205f02f8447884..a3ef550713fdfd4a97babd46a7e63227e72f70c1 100644 --- a/src/codegen/riscv64/Mir.zig +++ b/src/codegen/riscv64/Mir.zig @@ -189,7 +189,7 @@ pub const LoadSymbolPayload = struct { /// Used in conjunction with payload to transfer a list of used registers in a compact manner. pub const RegisterList = struct { - bitset: BitSet = BitSet.initEmpty(), + bitset: BitSet = .empty, const BitSet = IntegerBitSet(32); const Self = @This(); diff --git a/src/codegen/riscv64/abi.zig b/src/codegen/riscv64/abi.zig index 05164530df958129231fd514f8e4c17dff8e8590..26da73844fd1007ac596288aa5be7051a7831b41 100644 --- a/src/codegen/riscv64/abi.zig +++ b/src/codegen/riscv64/abi.zig @@ -344,7 +344,7 @@ pub const Registers = struct { }; fn initRegBitSet(start: usize, length: usize) RegisterBitSet { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; set.setRangeValue(.{ .start = start, .end = start + length, diff --git a/src/codegen/sparc64/CodeGen.zig b/src/codegen/sparc64/CodeGen.zig index c34e91bd96b0390cb063cf9bcd22261a364f2df1..3116a1183fa65cbf185273e81ade65c6f221a6a7 100644 --- a/src/codegen/sparc64/CodeGen.zig +++ b/src/codegen/sparc64/CodeGen.zig @@ -476,7 +476,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { const old_air_bookkeeping = self.air_bookkeeping; try self.ensureProcessDeathCapacity(Air.Liveness.bpi); - self.reused_operands = @TypeOf(self.reused_operands).initEmpty(); + self.reused_operands = @TypeOf(self.reused_operands).empty; switch (air_tags[@intFromEnum(inst)]) { // zig fmt: off diff --git a/src/codegen/sparc64/abi.zig b/src/codegen/sparc64/abi.zig index 5b5cf552d0a20099c3394c77fe85d5cab8335ab2..55cd37eeb8e4f8e4d9a336bb38326c944d6309e0 100644 --- a/src/codegen/sparc64/abi.zig +++ b/src/codegen/sparc64/abi.zig @@ -49,7 +49,7 @@ pub const RegisterManager = RegisterManagerFn(@import("CodeGen.zig"), Register, const RegisterBitSet = RegisterManager.RegisterBitSet; pub const RegisterClass = struct { pub const gp: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; set.setRangeValue(.{ .start = 0, .end = allocatable_regs.len, diff --git a/src/codegen/x86_64/CodeGen.zig b/src/codegen/x86_64/CodeGen.zig index 3d08433df90aca7a1a2a4d04cda61e5490cce266..e3998c245e83096b9a0040a41507f2015103d9f8 100644 --- a/src/codegen/x86_64/CodeGen.zig +++ b/src/codegen/x86_64/CodeGen.zig @@ -2298,7 +2298,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { wip_mir_log.debug("{f}", .{cg.fmtAir(inst)}); verbose_tracking_log.debug("{f}", .{cg.fmtTracking()}); - cg.reused_operands = .initEmpty(); + cg.reused_operands = .empty; try cg.inst_tracking.ensureUnusedCapacity(cg.gpa, 1); switch (air_tags[@intFromEnum(inst)]) { .select => try cg.airSelect(inst), @@ -177417,7 +177417,7 @@ fn airAsm(self: *CodeGen, inst: Air.Inst.Index) !void { used: bool, fn init(size: ?Memory.Size) @This() { return .{ - .op_has_size = if (size) |_| .initFull() else .initEmpty(), + .op_has_size = if (size) |_| .full else .empty, .size = size orelse .none, .used = false, }; @@ -178351,9 +178351,9 @@ fn genCopy(self: *CodeGen, ty: Type, dst_mcv: MCValue, src_mcv: MCValue, opts: C else => unreachable, }, dst_tag => |src_regs| { - var remaining: std.StaticBitSet(dst_regs.len) = .initFull(); + var remaining: std.StaticBitSet(dst_regs.len) = .full; var hazard_regs = src_regs; - while (!remaining.eql(.initEmpty())) { + while (!remaining.eql(.empty)) { var remaining_it = remaining.iterator(.{}); next: while (remaining_it.next()) |index| { const dst_reg = dst_regs[index]; diff --git a/src/codegen/x86_64/Mir.zig b/src/codegen/x86_64/Mir.zig index de02fbc01e25529c0283a5dd11d69220b6fea923..425c97bc80469044fc4e55da140682b811a7c885 100644 --- a/src/codegen/x86_64/Mir.zig +++ b/src/codegen/x86_64/Mir.zig @@ -1780,7 +1780,7 @@ pub const RegisterList = struct { const BitSet = std.bit_set.IntegerBitSet(32); const Self = @This(); - pub const empty: RegisterList = .{ .bitset = .initEmpty() }; + pub const empty: RegisterList = .{ .bitset = .empty }; fn getIndexForReg(registers: []const Register, reg: Register) BitSet.MaskInt { for (registers, 0..) |cpreg, i| { diff --git a/src/codegen/x86_64/abi.zig b/src/codegen/x86_64/abi.zig index e0838d23264a61048e55ad2567a590075044284b..911609b1f32ede79e9a7457c15884f544af85952 100644 --- a/src/codegen/x86_64/abi.zig +++ b/src/codegen/x86_64/abi.zig @@ -575,22 +575,22 @@ pub const RegisterManager = RegisterManagerFn(@import("CodeGen.zig"), Register, const RegisterBitSet = RegisterManager.RegisterBitSet; pub const RegisterClass = struct { pub const gp: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.general_purpose)) set.set(index); break :blk set; }; pub const gphi: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.gphi)) set.set(index); break :blk set; }; pub const x87: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.x87)) set.set(index); break :blk set; }; pub const sse: RegisterBitSet = blk: { - var set = RegisterBitSet.initEmpty(); + var set = RegisterBitSet.empty; for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.sse)) set.set(index); break :blk set; }; diff --git a/src/register_manager.zig b/src/register_manager.zig index 296025b8eba4ae3e0ab2371d9892ce19312488fa..1d53d1ab58d3a05fb000c68cd0ace0d719a2a087 100644 --- a/src/register_manager.zig +++ b/src/register_manager.zig @@ -34,12 +34,12 @@ pub fn RegisterManager( registers: TrackedRegisters = undefined, /// Tracks which registers are free (in which case the /// corresponding bit is set to 1) - free_registers: RegisterBitSet = .initFull(), + free_registers: RegisterBitSet = .full, /// Tracks all registers allocated in the course of this /// function - allocated_registers: RegisterBitSet = .initEmpty(), + allocated_registers: RegisterBitSet = .empty, /// Tracks registers which are locked from being allocated - locked_registers: RegisterBitSet = .initEmpty(), + locked_registers: RegisterBitSet = .empty, const Self = @This(); @@ -393,7 +393,7 @@ const MockRegister1 = enum(u2) { ); const gp = blk: { - var set: RM.RegisterBitSet = .initEmpty(); + var set: RM.RegisterBitSet = .empty; set.setRangeValue(.{ .start = 0, .end = allocatable_registers.len, @@ -421,7 +421,7 @@ const MockRegister2 = enum(u2) { ); const gp = blk: { - var set: RM.RegisterBitSet = .initEmpty(); + var set: RM.RegisterBitSet = .empty; set.setRangeValue(.{ .start = 0, .end = allocatable_registers.len, @@ -462,7 +462,7 @@ const MockRegister3 = enum(u3) { ); const gp = blk: { - var set: RM.RegisterBitSet = .initEmpty(); + var set: RM.RegisterBitSet = .empty; set.setRangeValue(.{ .start = 0, .end = gp_regs.len, @@ -470,7 +470,7 @@ const MockRegister3 = enum(u3) { break :blk set; }; const ext = blk: { - var set: RM.RegisterBitSet = .initEmpty(); + var set: RM.RegisterBitSet = .empty; set.setRangeValue(.{ .start = gp_regs.len, .end = allocatable_registers.len,