| ... | @@ -878,7 +878,7 @@ pub const String = enum(u32) { | ... | @@ -878,7 +878,7 @@ pub const String = enum(u32) { |
| 878 | fn wrap(unwrapped: Unwrapped, ip: *const InternPool) String { | 878 | fn wrap(unwrapped: Unwrapped, ip: *const InternPool) String { |
| 879 | assert(@intFromEnum(unwrapped.tid) <= ip.getTidMask()); | 879 | assert(@intFromEnum(unwrapped.tid) <= ip.getTidMask()); |
| 880 | assert(unwrapped.index <= ip.getIndexMask(u32)); | 880 | assert(unwrapped.index <= ip.getIndexMask(u32)); |
| 881 | return @enumFromInt(@intFromEnum(unwrapped.tid) << ip.tid_shift_32 | unwrapped.index); | 881 | return @enumFromInt(@as(u32, @intFromEnum(unwrapped.tid)) << ip.tid_shift_32 | unwrapped.index); |
| 882 | } | 882 | } |
| 883 | }; | 883 | }; |
| 884 | fn unwrap(string: String, ip: *const InternPool) Unwrapped { | 884 | fn unwrap(string: String, ip: *const InternPool) Unwrapped { |
| ... | @@ -3408,7 +3408,7 @@ pub const Index = enum(u32) { | ... | @@ -3408,7 +3408,7 @@ pub const Index = enum(u32) { |
| 3408 | fn wrap(unwrapped: Unwrapped, ip: *const InternPool) Index { | 3408 | fn wrap(unwrapped: Unwrapped, ip: *const InternPool) Index { |
| 3409 | assert(@intFromEnum(unwrapped.tid) <= ip.getTidMask()); | 3409 | assert(@intFromEnum(unwrapped.tid) <= ip.getTidMask()); |
| 3410 | assert(unwrapped.index <= ip.getIndexMask(u31)); | 3410 | assert(unwrapped.index <= ip.getIndexMask(u31)); |
| 3411 | return @enumFromInt(@intFromEnum(unwrapped.tid) << ip.tid_shift_31 | unwrapped.index); | 3411 | return @enumFromInt(@as(u32, @intFromEnum(unwrapped.tid)) << ip.tid_shift_31 | unwrapped.index); |
| 3412 | } | 3412 | } |
| 3413 | | 3413 | |
| 3414 | pub fn getExtra(unwrapped: Unwrapped, ip: *const InternPool) Local.Extra { | 3414 | pub fn getExtra(unwrapped: Unwrapped, ip: *const InternPool) Local.Extra { |
| ... | @@ -9651,7 +9651,7 @@ pub fn getOrPutTrailingString( | ... | @@ -9651,7 +9651,7 @@ pub fn getOrPutTrailingString( |
| 9651 | } | 9651 | } |
| 9652 | const key: []const u8 = strings.view().items(.@"0")[start..]; | 9652 | const key: []const u8 = strings.view().items(.@"0")[start..]; |
| 9653 | const value: embedded_nulls.StringType() = | 9653 | const value: embedded_nulls.StringType() = |
| 9654 | @enumFromInt(@intFromEnum(tid) << ip.tid_shift_32 | start); | 9654 | @enumFromInt(@as(u32, @intFromEnum(tid)) << ip.tid_shift_32 | start); |
| 9655 | const has_embedded_null = std.mem.indexOfScalar(u8, key, 0) != null; | 9655 | const has_embedded_null = std.mem.indexOfScalar(u8, key, 0) != null; |
| 9656 | switch (embedded_nulls) { | 9656 | switch (embedded_nulls) { |
| 9657 | .no_embedded_nulls => assert(!has_embedded_null), | 9657 | .no_embedded_nulls => assert(!has_embedded_null), |