| ... | @@ -2923,10 +2923,23 @@ pub fn addGlobalAssembly(zcu: *Zcu, cau: InternPool.Cau.Index, source: []const u | ... | @@ -2923,10 +2923,23 @@ pub fn addGlobalAssembly(zcu: *Zcu, cau: InternPool.Cau.Index, source: []const u |
| 2923 | } | 2923 | } |
| 2924 | | 2924 | |
| 2925 | pub const Feature = enum { | 2925 | pub const Feature = enum { |
| | 2926 | /// When this feature is enabled, Sema will emit calls to `std.builtin.panic` |
| | 2927 | /// for things like safety checks and unreachables. Otherwise traps will be emitted. |
| 2926 | panic_fn, | 2928 | panic_fn, |
| | 2929 | /// When this feature is enabled, Sema will emit calls to `std.builtin.panicUnwrapError`. |
| | 2930 | /// This error message requires more advanced formatting, hence it being seperate from `panic_fn`. |
| | 2931 | /// Otherwise traps will be emitted. |
| 2927 | panic_unwrap_error, | 2932 | panic_unwrap_error, |
| | 2933 | /// When this feature is enabled, Sema will emit calls to the more complex panic functions |
| | 2934 | /// that use formatting to add detail to error messages. Similar to `panic_unwrap_error`. |
| | 2935 | /// Otherwise traps will be emitted. |
| 2928 | safety_check_formatted, | 2936 | safety_check_formatted, |
| | 2937 | /// When this feature is enabled, Sema will insert tracer functions for gathering a stack |
| | 2938 | /// trace for error returns. |
| 2929 | error_return_trace, | 2939 | error_return_trace, |
| | 2940 | /// When this feature is enabled, Sema will emit the `is_named_enum_value` AIR instructions |
| | 2941 | /// and use it to check for corrupt switches. Backends currently need to implement their own |
| | 2942 | /// logic to determine whether an enum value is in the set of named values. |
| 2930 | is_named_enum_value, | 2943 | is_named_enum_value, |
| 2931 | error_set_has_value, | 2944 | error_set_has_value, |
| 2932 | field_reordering, | 2945 | field_reordering, |