| ... | ... | @@ -833,6 +833,10 @@ pub const PanicCause = union(enum) { |
| 833 | 833 | |
| 834 | 834 | pub fn panicSentinelMismatch(expected: anytype, found: @TypeOf(expected)) noreturn { |
| 835 | 835 | @branchHint(.cold); |
| 836 | if (builtin.zig_backend == .stage2_riscv64) { |
| 837 | // https://github.com/ziglang/zig/issues/21519 |
| 838 | @trap(); |
| 839 | } |
| 836 | 840 | switch (@typeInfo(@TypeOf(expected))) { |
| 837 | 841 | .int => |int| switch (int.signedness) { |
| 838 | 842 | .unsigned => if (int.bits <= @bitSizeOf(usize)) panic(.{ .sentinel_mismatch_usize = .{ |
| ... | ... | @@ -864,11 +868,19 @@ pub fn panicSentinelMismatch(expected: anytype, found: @TypeOf(expected)) noretu |
| 864 | 868 | |
| 865 | 869 | pub fn panicUnwrapError(ert: ?*StackTrace, err: anyerror) noreturn { |
| 866 | 870 | @branchHint(.cold); |
| 871 | if (builtin.zig_backend == .stage2_riscv64) { |
| 872 | // https://github.com/ziglang/zig/issues/21519 |
| 873 | @trap(); |
| 874 | } |
| 867 | 875 | panic(.{ .unwrap_error = err }, ert, @returnAddress()); |
| 868 | 876 | } |
| 869 | 877 | |
| 870 | 878 | pub fn panicOutOfBounds(index: usize, len: usize) noreturn { |
| 871 | 879 | @branchHint(.cold); |
| 880 | if (builtin.zig_backend == .stage2_riscv64) { |
| 881 | // https://github.com/ziglang/zig/issues/21519 |
| 882 | @trap(); |
| 883 | } |
| 872 | 884 | panic(.{ .index_out_of_bounds = .{ |
| 873 | 885 | .index = index, |
| 874 | 886 | .len = len, |
| ... | ... | @@ -877,6 +889,10 @@ pub fn panicOutOfBounds(index: usize, len: usize) noreturn { |
| 877 | 889 | |
| 878 | 890 | pub fn panicStartGreaterThanEnd(start: usize, end: usize) noreturn { |
| 879 | 891 | @branchHint(.cold); |
| 892 | if (builtin.zig_backend == .stage2_riscv64) { |
| 893 | // https://github.com/ziglang/zig/issues/21519 |
| 894 | @trap(); |
| 895 | } |
| 880 | 896 | panic(.{ .start_index_greater_than_end = .{ |
| 881 | 897 | .start = start, |
| 882 | 898 | .end = end, |
| ... | ... | @@ -885,6 +901,10 @@ pub fn panicStartGreaterThanEnd(start: usize, end: usize) noreturn { |
| 885 | 901 | |
| 886 | 902 | pub fn panicInactiveUnionField(active: anytype, accessed: @TypeOf(active)) noreturn { |
| 887 | 903 | @branchHint(.cold); |
| 904 | if (builtin.zig_backend == .stage2_riscv64) { |
| 905 | // https://github.com/ziglang/zig/issues/21519 |
| 906 | @trap(); |
| 907 | } |
| 888 | 908 | panic(.{ .inactive_union_field = .{ |
| 889 | 909 | .active = @tagName(active), |
| 890 | 910 | .accessed = @tagName(accessed), |