diff options
author | 2023-07-11 19:14:34 -0700 | |
---|---|---|
committer | 2023-07-11 19:14:34 -0700 | |
commit | cbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch) | |
tree | 43a00501f3cde495967e116f0b660777051551f8 /src/bit_set.zig | |
parent | 1f900cff453700b19bca2acadfe26da4468c1282 (diff) | |
parent | 34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff) | |
download | bun-jarred/esm-conditions.tar.gz bun-jarred/esm-conditions.tar.zst bun-jarred/esm-conditions.zip |
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to '')
-rw-r--r-- | src/bit_set.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bit_set.zig b/src/bit_set.zig index 5f18eb32b..d40794473 100644 --- a/src/bit_set.zig +++ b/src/bit_set.zig @@ -308,7 +308,7 @@ pub fn IntegerBitSet(comptime size: u16) type { } fn boolMaskBit(index: usize, value: bool) MaskInt { if (MaskInt == u0) return 0; - return @as(MaskInt, @boolToInt(value)) << @intCast(ShiftInt, index); + return @as(MaskInt, @intFromBool(value)) << @intCast(ShiftInt, index); } }; } @@ -653,7 +653,7 @@ pub fn ArrayBitSet(comptime MaskIntType: type, comptime size: usize) type { return index >> @bitSizeOf(ShiftInt); } inline fn boolMaskBit(index: usize, value: bool) MaskInt { - return @as(MaskInt, @boolToInt(value)) << @intCast(ShiftInt, index); + return @as(MaskInt, @intFromBool(value)) << @intCast(ShiftInt, index); } }; } @@ -751,7 +751,7 @@ pub const DynamicBitSetUnmanaged = struct { // fill in any new masks if (new_masks > old_masks) { const fill_value = std.math.boolMask(MaskInt, fill); - std.mem.set(MaskInt, self.masks[old_masks..new_masks], fill_value); + @memset(self.masks[old_masks..new_masks], fill_value); } } @@ -1088,7 +1088,7 @@ pub const DynamicBitSetUnmanaged = struct { return index >> @bitSizeOf(ShiftInt); } fn boolMaskBit(index: usize, value: bool) MaskInt { - return @as(MaskInt, @boolToInt(value)) << @intCast(ShiftInt, index); + return @as(MaskInt, @intFromBool(value)) << @intCast(ShiftInt, index); } fn numMasks(bit_length: usize) usize { return (bit_length + (@bitSizeOf(MaskInt) - 1)) / @bitSizeOf(MaskInt); |