authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-05 05:12:13+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-05 05:12:13+02:00
loge73257dec2d997e9d573419178695992790a9525
treeffebad814a53dfcad5facdc035f01f9956dd8982
parentad7a028228eabffd19b2d831bebe87c67723347c

lib/std: BitSet,EnumSet: replace initEmpty/initFull with decl literals (#31469)

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31469 Reviewed-by: Andrew Kelley <andrew@ziglang.org> Co-authored-by: nektro <hello@nektro.net> Co-committed-by: nektro <hello@nektro.net>

18 files changed, 76 insertions(+), 66 deletions(-)

lib/compiler/aro/backend/Ir/x86/Renderer.zig+3-3
......@@ -21,17 +21,17 @@ const RegisterManager = zig.RegisterManager(Renderer, Register, Ir.Ref, abi.allo
2121const RegisterBitSet = RegisterManager.RegisterBitSet;
2222const RegisterClass = struct {
2323 const gp: RegisterBitSet = blk: {
24 var set = RegisterBitSet.initEmpty();
24 var set = RegisterBitSet.empty;
2525 for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .general_purpose) set.set(index);
2626 break :blk set;
2727 };
2828 const x87: RegisterBitSet = blk: {
29 var set = RegisterBitSet.initEmpty();
29 var set = RegisterBitSet.empty;
3030 for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .x87) set.set(index);
3131 break :blk set;
3232 };
3333 const sse: RegisterBitSet = blk: {
34 var set = RegisterBitSet.initEmpty();
34 var set = RegisterBitSet.empty;
3535 for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .sse) set.set(index);
3636 break :blk set;
3737 };
lib/compiler/resinator/compile.zig+2-2
......@@ -2746,7 +2746,7 @@ pub const Compiler = struct {
27462746 // 1. Any permutation that does not have PRELOAD in it just uses the
27472747 // default flags.
27482748 const initial_flags = flags.*;
2749 var flags_set = std.enums.EnumSet(rc.CommonResourceAttributes).initEmpty();
2749 var flags_set = std.enums.EnumSet(rc.CommonResourceAttributes).empty;
27502750 for (tokens) |token| {
27512751 const attribute = rc.CommonResourceAttributes.map.get(token.slice(source)).?;
27522752 flags_set.insert(attribute);
......@@ -2769,7 +2769,7 @@ pub const Compiler = struct {
27692769 // 3. If none of DISCARDABLE, SHARED, or PURE is specified, then PRELOAD
27702770 // implies `flags &= ~SHARED` and LOADONCALL implies `flags |= SHARED`
27712771 const shared_set = comptime blk: {
2772 var set = std.enums.EnumSet(rc.CommonResourceAttributes).initEmpty();
2772 var set = std.enums.EnumSet(rc.CommonResourceAttributes).empty;
27732773 set.insert(.discardable);
27742774 set.insert(.shared);
27752775 set.insert(.pure);
lib/std/Io/Kqueue.zig+2-2
......@@ -186,7 +186,7 @@ pub fn init(k: *Kqueue, gpa: Allocator, options: InitOptions) !void {
186186 .awaiter = null,
187187 .queue_next = null,
188188 .cancel_thread = null,
189 .awaiting_completions = .initEmpty(),
189 .awaiting_completions = .empty,
190190 };
191191 const main_thread = &k.threads.allocated[0];
192192 Thread.self = main_thread;
......@@ -713,7 +713,7 @@ fn concurrent(
713713 .awaiter = null,
714714 .queue_next = null,
715715 .cancel_thread = null,
716 .awaiting_completions = .initEmpty(),
716 .awaiting_completions = .empty,
717717 };
718718 closure.* = .{
719719 .kqueue = k,
lib/std/bit_set.zig+22-6
......@@ -68,16 +68,24 @@ pub fn IntegerBitSet(comptime size: u16) type {
6868 /// The bit mask, as a single integer
6969 mask: MaskInt,
7070
71 /// Deprecated: use `.empty`.
7172 /// Creates a bit set with no elements present.
7273 pub fn initEmpty() Self {
7374 return .{ .mask = 0 };
7475 }
7576
77 /// Deprecated: use `.full`.
7678 /// Creates a bit set with all elements present.
7779 pub fn initFull() Self {
7880 return .{ .mask = ~@as(MaskInt, 0) };
7981 }
8082
83 /// A bit set with no elements present.
84 pub const empty: Self = .{ .mask = 0 };
85
86 /// A bit set with all elements present.
87 pub const full: Self = .{ .mask = ~@as(MaskInt, 0) };
88
8189 /// Returns the number of bits in this bit set
8290 pub inline fn capacity(self: Self) usize {
8391 _ = self;
......@@ -387,11 +395,13 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type {
387395 /// Padding bits at the end are undefined.
388396 masks: [num_masks]MaskInt,
389397
398 /// Deprecated: use `.empty`.
390399 /// Creates a bit set with no elements present.
391400 pub fn initEmpty() Self {
392401 return .{ .masks = [_]MaskInt{0} ** num_masks };
393402 }
394403
404 /// Deprecated: use `.full`.
395405 /// Creates a bit set with all elements present.
396406 pub fn initFull() Self {
397407 if (num_masks == 0) {
......@@ -401,6 +411,12 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type {
401411 }
402412 }
403413
414 /// A bit set with no elements present.
415 pub const empty: Self = .{ .masks = @splat(0) };
416
417 /// A bit set with all elements present.
418 pub const full: Self = .{ .masks = if (num_masks == 0) .{} else ([_]MaskInt{~@as(MaskInt, 0)} ** (num_masks - 1) ++ [_]MaskInt{last_item_mask}) };
419
404420 /// Returns the number of bits in this bit set
405421 pub inline fn capacity(self: Self) usize {
406422 _ = self;
......@@ -1633,17 +1649,17 @@ fn fillOdd(set: anytype, len: usize) void {
16331649}
16341650
16351651fn testPureBitSet(comptime Set: type) !void {
1636 const empty = Set.initEmpty();
1637 const full = Set.initFull();
1652 const empty = Set.empty;
1653 const full = Set.full;
16381654
16391655 const even = even: {
1640 var bit_set = Set.initEmpty();
1656 var bit_set = Set.empty;
16411657 fillEven(&bit_set, Set.bit_length);
16421658 break :even bit_set;
16431659 };
16441660
16451661 const odd = odd: {
1646 var bit_set = Set.initEmpty();
1662 var bit_set = Set.empty;
16471663 fillOdd(&bit_set, Set.bit_length);
16481664 break :odd bit_set;
16491665 };
......@@ -1686,8 +1702,8 @@ fn testPureBitSet(comptime Set: type) !void {
16861702}
16871703
16881704fn testStaticBitSet(comptime Set: type) !void {
1689 var a = Set.initEmpty();
1690 var b = Set.initFull();
1705 var a = Set.empty;
1706 var b = Set.full;
16911707 try testing.expectEqual(@as(usize, 0), a.count());
16921708 try testing.expectEqual(@as(usize, Set.bit_length), b.count());
16931709
lib/std/crypto/codecs/base64_hex_ct.zig+2-2
......@@ -93,7 +93,7 @@ pub const hex = struct {
9393 /// The decoder will skip any characters that are in the ignore list.
9494 /// The ignore list must not contain any valid hexadecimal characters.
9595 pub fn decoderWithIgnore(ignore_chars: []const u8) error{InvalidCharacter}!DecoderWithIgnore {
96 var ignored_chars = StaticBitSet(256).initEmpty();
96 var ignored_chars = StaticBitSet(256).empty;
9797 for (ignore_chars) |c| {
9898 switch (c) {
9999 '0'...'9', 'a'...'f', 'A'...'F' => return error.InvalidCharacter,
......@@ -269,7 +269,7 @@ pub const base64 = struct {
269269
270270 /// Creates a new decoder that ignores certain characters.
271271 pub fn decoderWithIgnore(ignore_chars: []const u8) error{InvalidCharacter}!DecoderWithIgnore {
272 var ignored_chars = StaticBitSet(256).initEmpty();
272 var ignored_chars = StaticBitSet(256).empty;
273273 for (ignore_chars) |c| {
274274 switch (c) {
275275 'A'...'Z', 'a'...'z', '0'...'9' => return error.InvalidCharacter,
lib/std/enums.zig+19-25
......@@ -252,7 +252,7 @@ pub fn EnumSet(comptime E: type) type {
252252 /// The maximum number of items in this set.
253253 pub const len = Indexer.count;
254254
255 bits: BitSet = BitSet.initEmpty(),
255 bits: BitSet = .empty,
256256
257257 /// Initializes the set using a struct of bools
258258 pub fn init(init_values: EnumFieldStruct(E, bool, false)) Self {
......@@ -278,19 +278,15 @@ pub fn EnumSet(comptime E: type) type {
278278 return result;
279279 }
280280
281 /// Returns a set containing no keys.
282 pub fn initEmpty() Self {
283 return .{ .bits = BitSet.initEmpty() };
284 }
281 /// A set containing no keys.
282 pub const empty: Self = .{ .bits = .empty };
285283
286 /// Returns a set containing all possible keys.
287 pub fn initFull() Self {
288 return .{ .bits = BitSet.initFull() };
289 }
284 /// A set containing all possible keys.
285 pub const full: Self = .{ .bits = .full };
290286
291287 /// Returns a set containing multiple keys.
292288 pub fn initMany(keys: []const Key) Self {
293 var set = initEmpty();
289 var set: Self = .empty;
294290 for (keys) |key| set.insert(key);
295291 return set;
296292 }
......@@ -440,7 +436,7 @@ pub fn EnumMap(comptime E: type, comptime V: type) type {
440436 const BitSet = std.StaticBitSet(Indexer.count);
441437
442438 /// Bits determining whether items are in the map
443 bits: BitSet = BitSet.initEmpty(),
439 bits: BitSet = .empty,
444440 /// Values of items in the map. If the associated
445441 /// bit is zero, the value is undefined.
446442 values: [Indexer.count]Value = undefined,
......@@ -475,7 +471,7 @@ pub fn EnumMap(comptime E: type, comptime V: type) type {
475471 /// Consider using EnumArray instead if the map will remain full.
476472 pub fn initFull(value: Value) Self {
477473 var result: Self = .{
478 .bits = Self.BitSet.initFull(),
474 .bits = .full,
479475 .values = undefined,
480476 };
481477 @memset(&result.values, value);
......@@ -493,7 +489,7 @@ pub fn EnumMap(comptime E: type, comptime V: type) type {
493489 pub fn initFullWithDefault(comptime default: ?Value, init_values: EnumFieldStruct(E, Value, default)) Self {
494490 @setEvalBranchQuota(2 * @typeInfo(E).@"enum".fields.len);
495491 var result: Self = .{
496 .bits = Self.BitSet.initFull(),
492 .bits = .full,
497493 .values = undefined,
498494 };
499495 inline for (0..Self.len) |i| {
......@@ -687,16 +683,14 @@ pub fn BoundedEnumMultiset(comptime E: type, comptime CountSize: type) type {
687683 return self;
688684 }
689685
690 /// Initializes the multiset with a count of zero.
691 pub fn initEmpty() Self {
692 return initWithCount(0);
693 }
686 /// A multiset with a count of zero.
687 pub const empty: Self = .initWithCount(0);
694688
695689 /// Initializes the multiset with all keys at the
696690 /// same count.
697691 pub fn initWithCount(comptime c: CountSize) Self {
698692 return .{
699 .counts = EnumArray(E, CountSize).initDefault(c, .{}),
693 .counts = .initDefault(c, .{}),
700694 };
701695 }
702696
......@@ -855,7 +849,7 @@ pub fn BoundedEnumMultiset(comptime E: type, comptime CountSize: type) type {
855849test EnumMultiset {
856850 const Ball = enum { red, green, blue };
857851
858 const empty = EnumMultiset(Ball).initEmpty();
852 const empty = EnumMultiset(Ball).empty;
859853 const r0_g1_b2 = EnumMultiset(Ball).init(.{
860854 .red = 0,
861855 .green = 1,
......@@ -1162,8 +1156,8 @@ pub fn EnumArray(comptime E: type, comptime V: type) type {
11621156test "pure EnumSet fns" {
11631157 const Suit = enum { spades, hearts, clubs, diamonds };
11641158
1165 const empty = EnumSet(Suit).initEmpty();
1166 const full = EnumSet(Suit).initFull();
1159 const empty = EnumSet(Suit).empty;
1160 const full = EnumSet(Suit).full;
11671161 const black = EnumSet(Suit).initMany(&[_]Suit{ .spades, .clubs });
11681162 const red = EnumSet(Suit).initMany(&[_]Suit{ .hearts, .diamonds });
11691163
......@@ -1224,8 +1218,8 @@ test "pure EnumSet fns" {
12241218
12251219test "EnumSet empty" {
12261220 const E = enum {};
1227 const empty = EnumSet(E).initEmpty();
1228 const full = EnumSet(E).initFull();
1221 const empty = EnumSet(E).empty;
1222 const full = EnumSet(E).full;
12291223
12301224 try std.testing.expect(empty.eql(full));
12311225 try std.testing.expect(empty.complement().eql(full));
......@@ -1236,13 +1230,13 @@ test "EnumSet empty" {
12361230test "EnumSet const iterator" {
12371231 const Direction = enum { up, down, left, right };
12381232 const diag_move = init: {
1239 var move = EnumSet(Direction).initEmpty();
1233 var move = EnumSet(Direction).empty;
12401234 move.insert(.right);
12411235 move.insert(.up);
12421236 break :init move;
12431237 };
12441238
1245 var result = EnumSet(Direction).initEmpty();
1239 var result = EnumSet(Direction).empty;
12461240 var it = diag_move.iterator();
12471241 while (it.next()) |dir| {
12481242 result.insert(dir);
src/Air/Legalize.zig+3-3
......@@ -15,7 +15,7 @@ features: if (switch (dev.env) {
1515 }
1616 /// `inline` to propagate comptime-known result.
1717 inline fn hasAny(_: @This(), comptime features: []const Feature) bool {
18 return comptime !bootstrap_features.intersectWith(.initMany(features)).eql(.initEmpty());
18 return comptime !bootstrap_features.intersectWith(.initMany(features)).eql(.empty);
1919 }
2020} else struct {
2121 features: *const Features,
......@@ -28,7 +28,7 @@ features: if (switch (dev.env) {
2828 return rt.features.contains(feature);
2929 }
3030 fn hasAny(rt: @This(), comptime features: []const Feature) bool {
31 return !rt.features.intersectWith(comptime .initMany(features)).eql(comptime .initEmpty());
31 return !rt.features.intersectWith(comptime .initMany(features)).eql(.empty);
3232 }
3333},
3434
......@@ -276,7 +276,7 @@ pub const Features = std.enums.EnumSet(Feature);
276276pub const Error = std.mem.Allocator.Error;
277277
278278pub fn legalize(air: *Air, pt: Zcu.PerThread, features: *const Features) Error!void {
279 assert(!features.eql(comptime .initEmpty())); // backend asked to run legalize, but no features were enabled
279 assert(!features.eql(.empty)); // backend asked to run legalize, but no features were enabled
280280 var l: Legalize = .{
281281 .pt = pt,
282282 .air_instructions = air.instructions.toMultiArrayList(),
src/codegen/aarch64.zig+1-1
......@@ -46,7 +46,7 @@ pub fn generate(
4646 .dom_len = 0,
4747 .dom = .empty,
4848
49 .saved_registers = comptime .initEmpty(),
49 .saved_registers = .empty,
5050 .instructions = .empty,
5151 .literals = .empty,
5252 .nav_relocs = .empty,
src/codegen/aarch64/Assemble.zig+1-1
......@@ -129,7 +129,7 @@ const matchers = matchers: {
129129 break :Symbols @Struct(.auto, null, &field_names, &field_types, &@splat(.{}));
130130 } = undefined;
131131 const Symbol = std.meta.FieldEnum(@TypeOf(instruction.symbols));
132 comptime var unused_symbols: std.enums.EnumSet(Symbol) = .initFull();
132 comptime var unused_symbols: std.enums.EnumSet(Symbol) = .full;
133133 comptime var pattern_as: Assemble = .{ .source = instruction.pattern, .operands = undefined };
134134 inline while (true) {
135135 comptime var ct_token_buf: [token_buf_len]u8 = undefined;
src/codegen/riscv64/CodeGen.zig+1-1
......@@ -1386,7 +1386,7 @@ fn genBody(func: *Func, body: []const Air.Inst.Index) InnerError!void {
13861386 const old_air_bookkeeping = func.air_bookkeeping;
13871387 try func.ensureProcessDeathCapacity(Air.Liveness.bpi);
13881388
1389 func.reused_operands = @TypeOf(func.reused_operands).initEmpty();
1389 func.reused_operands = @TypeOf(func.reused_operands).empty;
13901390 try func.inst_tracking.ensureUnusedCapacity(func.gpa, 1);
13911391 const tag = air_tags[@intFromEnum(inst)];
13921392 switch (tag) {
src/codegen/riscv64/Mir.zig+1-1
......@@ -189,7 +189,7 @@ pub const LoadSymbolPayload = struct {
189189
190190/// Used in conjunction with payload to transfer a list of used registers in a compact manner.
191191pub const RegisterList = struct {
192 bitset: BitSet = BitSet.initEmpty(),
192 bitset: BitSet = .empty,
193193
194194 const BitSet = IntegerBitSet(32);
195195 const Self = @This();
src/codegen/riscv64/abi.zig+1-1
......@@ -344,7 +344,7 @@ pub const Registers = struct {
344344};
345345
346346fn initRegBitSet(start: usize, length: usize) RegisterBitSet {
347 var set = RegisterBitSet.initEmpty();
347 var set = RegisterBitSet.empty;
348348 set.setRangeValue(.{
349349 .start = start,
350350 .end = start + length,
src/codegen/sparc64/CodeGen.zig+1-1
......@@ -476,7 +476,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
476476 const old_air_bookkeeping = self.air_bookkeeping;
477477 try self.ensureProcessDeathCapacity(Air.Liveness.bpi);
478478
479 self.reused_operands = @TypeOf(self.reused_operands).initEmpty();
479 self.reused_operands = @TypeOf(self.reused_operands).empty;
480480 switch (air_tags[@intFromEnum(inst)]) {
481481 // zig fmt: off
482482
src/codegen/sparc64/abi.zig+1-1
......@@ -49,7 +49,7 @@ pub const RegisterManager = RegisterManagerFn(@import("CodeGen.zig"), Register,
4949const RegisterBitSet = RegisterManager.RegisterBitSet;
5050pub const RegisterClass = struct {
5151 pub const gp: RegisterBitSet = blk: {
52 var set = RegisterBitSet.initEmpty();
52 var set = RegisterBitSet.empty;
5353 set.setRangeValue(.{
5454 .start = 0,
5555 .end = allocatable_regs.len,
src/codegen/x86_64/CodeGen.zig+4-4
......@@ -2298,7 +2298,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
22982298 wip_mir_log.debug("{f}", .{cg.fmtAir(inst)});
22992299 verbose_tracking_log.debug("{f}", .{cg.fmtTracking()});
23002300
2301 cg.reused_operands = .initEmpty();
2301 cg.reused_operands = .empty;
23022302 try cg.inst_tracking.ensureUnusedCapacity(cg.gpa, 1);
23032303 switch (air_tags[@intFromEnum(inst)]) {
23042304 .select => try cg.airSelect(inst),
......@@ -177417,7 +177417,7 @@ fn airAsm(self: *CodeGen, inst: Air.Inst.Index) !void {
177417177417 used: bool,
177418177418 fn init(size: ?Memory.Size) @This() {
177419177419 return .{
177420 .op_has_size = if (size) |_| .initFull() else .initEmpty(),
177420 .op_has_size = if (size) |_| .full else .empty,
177421177421 .size = size orelse .none,
177422177422 .used = false,
177423177423 };
......@@ -178351,9 +178351,9 @@ fn genCopy(self: *CodeGen, ty: Type, dst_mcv: MCValue, src_mcv: MCValue, opts: C
178351178351 else => unreachable,
178352178352 },
178353178353 dst_tag => |src_regs| {
178354 var remaining: std.StaticBitSet(dst_regs.len) = .initFull();
178354 var remaining: std.StaticBitSet(dst_regs.len) = .full;
178355178355 var hazard_regs = src_regs;
178356 while (!remaining.eql(.initEmpty())) {
178356 while (!remaining.eql(.empty)) {
178357178357 var remaining_it = remaining.iterator(.{});
178358178358 next: while (remaining_it.next()) |index| {
178359178359 const dst_reg = dst_regs[index];
src/codegen/x86_64/Mir.zig+1-1
......@@ -1780,7 +1780,7 @@ pub const RegisterList = struct {
17801780 const BitSet = std.bit_set.IntegerBitSet(32);
17811781 const Self = @This();
17821782
1783 pub const empty: RegisterList = .{ .bitset = .initEmpty() };
1783 pub const empty: RegisterList = .{ .bitset = .empty };
17841784
17851785 fn getIndexForReg(registers: []const Register, reg: Register) BitSet.MaskInt {
17861786 for (registers, 0..) |cpreg, i| {
src/codegen/x86_64/abi.zig+4-4
......@@ -575,22 +575,22 @@ pub const RegisterManager = RegisterManagerFn(@import("CodeGen.zig"), Register,
575575const RegisterBitSet = RegisterManager.RegisterBitSet;
576576pub const RegisterClass = struct {
577577 pub const gp: RegisterBitSet = blk: {
578 var set = RegisterBitSet.initEmpty();
578 var set = RegisterBitSet.empty;
579579 for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.general_purpose)) set.set(index);
580580 break :blk set;
581581 };
582582 pub const gphi: RegisterBitSet = blk: {
583 var set = RegisterBitSet.initEmpty();
583 var set = RegisterBitSet.empty;
584584 for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.gphi)) set.set(index);
585585 break :blk set;
586586 };
587587 pub const x87: RegisterBitSet = blk: {
588 var set = RegisterBitSet.initEmpty();
588 var set = RegisterBitSet.empty;
589589 for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.x87)) set.set(index);
590590 break :blk set;
591591 };
592592 pub const sse: RegisterBitSet = blk: {
593 var set = RegisterBitSet.initEmpty();
593 var set = RegisterBitSet.empty;
594594 for (allocatable_regs, 0..) |reg, index| if (reg.isClass(.sse)) set.set(index);
595595 break :blk set;
596596 };
src/register_manager.zig+7-7
......@@ -34,12 +34,12 @@ pub fn RegisterManager(
3434 registers: TrackedRegisters = undefined,
3535 /// Tracks which registers are free (in which case the
3636 /// corresponding bit is set to 1)
37 free_registers: RegisterBitSet = .initFull(),
37 free_registers: RegisterBitSet = .full,
3838 /// Tracks all registers allocated in the course of this
3939 /// function
40 allocated_registers: RegisterBitSet = .initEmpty(),
40 allocated_registers: RegisterBitSet = .empty,
4141 /// Tracks registers which are locked from being allocated
42 locked_registers: RegisterBitSet = .initEmpty(),
42 locked_registers: RegisterBitSet = .empty,
4343
4444 const Self = @This();
4545
......@@ -393,7 +393,7 @@ const MockRegister1 = enum(u2) {
393393 );
394394
395395 const gp = blk: {
396 var set: RM.RegisterBitSet = .initEmpty();
396 var set: RM.RegisterBitSet = .empty;
397397 set.setRangeValue(.{
398398 .start = 0,
399399 .end = allocatable_registers.len,
......@@ -421,7 +421,7 @@ const MockRegister2 = enum(u2) {
421421 );
422422
423423 const gp = blk: {
424 var set: RM.RegisterBitSet = .initEmpty();
424 var set: RM.RegisterBitSet = .empty;
425425 set.setRangeValue(.{
426426 .start = 0,
427427 .end = allocatable_registers.len,
......@@ -462,7 +462,7 @@ const MockRegister3 = enum(u3) {
462462 );
463463
464464 const gp = blk: {
465 var set: RM.RegisterBitSet = .initEmpty();
465 var set: RM.RegisterBitSet = .empty;
466466 set.setRangeValue(.{
467467 .start = 0,
468468 .end = gp_regs.len,
......@@ -470,7 +470,7 @@ const MockRegister3 = enum(u3) {
470470 break :blk set;
471471 };
472472 const ext = blk: {
473 var set: RM.RegisterBitSet = .initEmpty();
473 var set: RM.RegisterBitSet = .empty;
474474 set.setRangeValue(.{
475475 .start = gp_regs.len,
476476 .end = allocatable_registers.len,