| ... | @@ -677,6 +677,13 @@ pub const panic: PanicFn = if (@hasDecl(root, "panic")) root.panic else default_ | ... | @@ -677,6 +677,13 @@ pub const panic: PanicFn = if (@hasDecl(root, "panic")) root.panic else default_ |
| 677 | /// therefore must be kept in sync with the compiler implementation. | 677 | /// therefore must be kept in sync with the compiler implementation. |
| 678 | pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn { | 678 | pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace) noreturn { |
| 679 | @setCold(true); | 679 | @setCold(true); |
| | 680 | // Until self-hosted catches up with stage1 language features, we have a simpler |
| | 681 | // default panic function: |
| | 682 | if (builtin.zig_is_stage2) { |
| | 683 | while (true) { |
| | 684 | @breakpoint(); |
| | 685 | } |
| | 686 | } |
| 680 | if (@hasDecl(root, "os") and @hasDecl(root.os, "panic")) { | 687 | if (@hasDecl(root, "os") and @hasDecl(root.os, "panic")) { |
| 681 | root.os.panic(msg, error_return_trace); | 688 | root.os.panic(msg, error_return_trace); |
| 682 | unreachable; | 689 | unreachable; |