diff options
author | 2023-06-21 23:38:18 -0700 | |
---|---|---|
committer | 2023-06-21 23:38:18 -0700 | |
commit | 5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f (patch) | |
tree | 97f669a178e60772038751d690c3e298a63557b2 /src/bit_set.zig | |
parent | bfb322d618a3f0e9618d311ae69016fe7a08e771 (diff) | |
download | bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.tar.gz bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.tar.zst bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.zip |
upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374)
* progress
* finish `@memset/@memcpy` update
* Update build.zig
* change `@enumToInt` to `@intFromEnum` and friends
* update zig versions
* it was 1
* add link to issue
* add `compileError` reminder
* fix merge
* format
* upgrade to llvm 16
* Revert "upgrade to llvm 16"
This reverts commit cc930ceb1c5b4db9614a7638596948f704544ab8.
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bit_set.zig')
-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); |