| author | |
| committer | |
| log | eb375525366ba51c3f626cf9b27d97fc81e2c938 |
| tree | babf69fdb1cd163a81ecb4c23581a628bbf1f9ce |
| parent | d83b95cbf4895027b1730ef6025df4fe01beba26 |
Basically everything that has a direct replacement or no uses left.
Notable omissions:
- std.ArrayHashMap: Too much fallout, needs a separate cleanup.
- std.debug.runtime_safety: Too much fallout.
- std.heap.GeneralPurposeAllocator: Lots of references to it remain, not
a simple find and replace as "debug allocator" is not equivalent to
"general purpose allocator".
- std.io.Reader: Is being reworked at the moment.
- std.unicode.utf8Decode(): No replacement, needs a new API first.
- Manifest backwards compat options: Removal would break test data used
by TestFetchBuilder.
- panic handler needs to be a namespace: Many tests still rely on it
being a function, needs a separate cleanup.62 files changed, 128 insertions(+), 642 deletions(-)
doc/langref/build_c.zig+2-1| ... | ... | @@ -1,7 +1,8 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | |
| 3 | 3 | pub fn build(b: *std.Build) void { |
| 4 | const lib = b.addSharedLibrary(.{ | |
| 4 | const lib = b.addLibrary(.{ | |
| 5 | .linkage = .dynamic, | |
| 5 | 6 | .name = "mathtest", |
| 6 | 7 | .root_source_file = b.path("mathtest.zig"), |
| 7 | 8 | .version = .{ .major = 1, .minor = 0, .patch = 0 }, |
doc/langref/test_noreturn_from_exit.zig+1-1| ... | ... | @@ -3,7 +3,7 @@ const builtin = @import("builtin"); |
| 3 | 3 | const native_arch = builtin.cpu.arch; |
| 4 | 4 | const expect = std.testing.expect; |
| 5 | 5 | |
| 6 | const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .Stdcall else .C; | |
| 6 | const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .{ .x86_stdcall = .{} } else .c; | |
| 7 | 7 | extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(WINAPI) noreturn; |
| 8 | 8 | |
| 9 | 9 | test "foo" { |
lib/compiler/aro/aro/Parser.zig+1-1| ... | ... | @@ -8259,7 +8259,7 @@ fn charLiteral(p: *Parser) Error!Result { |
| 8259 | 8259 | const slice = char_kind.contentSlice(p.tokSlice(p.tok_i)); |
| 8260 | 8260 | |
| 8261 | 8261 | var is_multichar = false; |
| 8262 | if (slice.len == 1 and std.ascii.isASCII(slice[0])) { | |
| 8262 | if (slice.len == 1 and std.ascii.isAscii(slice[0])) { | |
| 8263 | 8263 | // fast path: single unescaped ASCII char |
| 8264 | 8264 | val = slice[0]; |
| 8265 | 8265 | } else { |
lib/compiler/aro_translate_c.zig+1-1| ... | ... | @@ -1820,7 +1820,7 @@ pub fn main() !void { |
| 1820 | 1820 | var tree = translate(gpa, &aro_comp, args) catch |err| switch (err) { |
| 1821 | 1821 | error.ParsingFailed, error.FatalError => renderErrorsAndExit(&aro_comp), |
| 1822 | 1822 | error.OutOfMemory => return error.OutOfMemory, |
| 1823 | error.StreamTooLong => std.zig.fatal("An input file was larger than 4GiB", .{}), | |
| 1823 | error.StreamTooLong => std.process.fatal("An input file was larger than 4GiB", .{}), | |
| 1824 | 1824 | }; |
| 1825 | 1825 | defer tree.deinit(gpa); |
| 1826 | 1826 |
lib/compiler/objcopy.zig+1-1| ... | ... | @@ -7,7 +7,7 @@ const Allocator = std.mem.Allocator; |
| 7 | 7 | const File = std.fs.File; |
| 8 | 8 | const assert = std.debug.assert; |
| 9 | 9 | |
| 10 | const fatal = std.zig.fatal; | |
| 10 | const fatal = std.process.fatal; | |
| 11 | 11 | const Server = std.zig.Server; |
| 12 | 12 | |
| 13 | 13 | pub fn main() !void { |
lib/std/Build.zig+7-314| ... | ... | @@ -692,6 +692,7 @@ pub fn addOptions(b: *Build) *Step.Options { |
| 692 | 692 | |
| 693 | 693 | pub const ExecutableOptions = struct { |
| 694 | 694 | name: []const u8, |
| 695 | root_module: *Module, | |
| 695 | 696 | version: ?std.SemanticVersion = null, |
| 696 | 697 | linkage: ?std.builtin.LinkMode = null, |
| 697 | 698 | max_rss: usize = 0, |
| ... | ... | @@ -704,58 +705,12 @@ pub const ExecutableOptions = struct { |
| 704 | 705 | /// Can be set regardless of target. The `.manifest` file will be ignored |
| 705 | 706 | /// if the target object format does not support embedded manifests. |
| 706 | 707 | win32_manifest: ?LazyPath = null, |
| 707 | ||
| 708 | /// Prefer populating this field (using e.g. `createModule`) instead of populating | |
| 709 | /// the following fields (`root_source_file` etc). In a future release, those fields | |
| 710 | /// will be removed, and this field will become non-optional. | |
| 711 | root_module: ?*Module = null, | |
| 712 | ||
| 713 | /// Deprecated; prefer populating `root_module`. | |
| 714 | root_source_file: ?LazyPath = null, | |
| 715 | /// Deprecated; prefer populating `root_module`. | |
| 716 | target: ?ResolvedTarget = null, | |
| 717 | /// Deprecated; prefer populating `root_module`. | |
| 718 | optimize: std.builtin.OptimizeMode = .Debug, | |
| 719 | /// Deprecated; prefer populating `root_module`. | |
| 720 | code_model: std.builtin.CodeModel = .default, | |
| 721 | /// Deprecated; prefer populating `root_module`. | |
| 722 | link_libc: ?bool = null, | |
| 723 | /// Deprecated; prefer populating `root_module`. | |
| 724 | single_threaded: ?bool = null, | |
| 725 | /// Deprecated; prefer populating `root_module`. | |
| 726 | pic: ?bool = null, | |
| 727 | /// Deprecated; prefer populating `root_module`. | |
| 728 | strip: ?bool = null, | |
| 729 | /// Deprecated; prefer populating `root_module`. | |
| 730 | unwind_tables: ?std.builtin.UnwindTables = null, | |
| 731 | /// Deprecated; prefer populating `root_module`. | |
| 732 | omit_frame_pointer: ?bool = null, | |
| 733 | /// Deprecated; prefer populating `root_module`. | |
| 734 | sanitize_thread: ?bool = null, | |
| 735 | /// Deprecated; prefer populating `root_module`. | |
| 736 | error_tracing: ?bool = null, | |
| 737 | 708 | }; |
| 738 | 709 | |
| 739 | 710 | pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile { |
| 740 | if (options.root_module != null and options.target != null) { | |
| 741 | @panic("`root_module` and `target` cannot both be populated"); | |
| 742 | } | |
| 743 | 711 | return .create(b, .{ |
| 744 | 712 | .name = options.name, |
| 745 | .root_module = options.root_module orelse b.createModule(.{ | |
| 746 | .root_source_file = options.root_source_file, | |
| 747 | .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), | |
| 748 | .optimize = options.optimize, | |
| 749 | .link_libc = options.link_libc, | |
| 750 | .single_threaded = options.single_threaded, | |
| 751 | .pic = options.pic, | |
| 752 | .strip = options.strip, | |
| 753 | .unwind_tables = options.unwind_tables, | |
| 754 | .omit_frame_pointer = options.omit_frame_pointer, | |
| 755 | .sanitize_thread = options.sanitize_thread, | |
| 756 | .error_tracing = options.error_tracing, | |
| 757 | .code_model = options.code_model, | |
| 758 | }), | |
| 713 | .root_module = options.root_module, | |
| 759 | 714 | .version = options.version, |
| 760 | 715 | .kind = .exe, |
| 761 | 716 | .linkage = options.linkage, |
| ... | ... | @@ -769,62 +724,17 @@ pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile { |
| 769 | 724 | |
| 770 | 725 | pub const ObjectOptions = struct { |
| 771 | 726 | name: []const u8, |
| 727 | root_module: *Module, | |
| 772 | 728 | max_rss: usize = 0, |
| 773 | 729 | use_llvm: ?bool = null, |
| 774 | 730 | use_lld: ?bool = null, |
| 775 | 731 | zig_lib_dir: ?LazyPath = null, |
| 776 | ||
| 777 | /// Prefer populating this field (using e.g. `createModule`) instead of populating | |
| 778 | /// the following fields (`root_source_file` etc). In a future release, those fields | |
| 779 | /// will be removed, and this field will become non-optional. | |
| 780 | root_module: ?*Module = null, | |
| 781 | ||
| 782 | /// Deprecated; prefer populating `root_module`. | |
| 783 | root_source_file: ?LazyPath = null, | |
| 784 | /// Deprecated; prefer populating `root_module`. | |
| 785 | target: ?ResolvedTarget = null, | |
| 786 | /// Deprecated; prefer populating `root_module`. | |
| 787 | optimize: std.builtin.OptimizeMode = .Debug, | |
| 788 | /// Deprecated; prefer populating `root_module`. | |
| 789 | code_model: std.builtin.CodeModel = .default, | |
| 790 | /// Deprecated; prefer populating `root_module`. | |
| 791 | link_libc: ?bool = null, | |
| 792 | /// Deprecated; prefer populating `root_module`. | |
| 793 | single_threaded: ?bool = null, | |
| 794 | /// Deprecated; prefer populating `root_module`. | |
| 795 | pic: ?bool = null, | |
| 796 | /// Deprecated; prefer populating `root_module`. | |
| 797 | strip: ?bool = null, | |
| 798 | /// Deprecated; prefer populating `root_module`. | |
| 799 | unwind_tables: ?std.builtin.UnwindTables = null, | |
| 800 | /// Deprecated; prefer populating `root_module`. | |
| 801 | omit_frame_pointer: ?bool = null, | |
| 802 | /// Deprecated; prefer populating `root_module`. | |
| 803 | sanitize_thread: ?bool = null, | |
| 804 | /// Deprecated; prefer populating `root_module`. | |
| 805 | error_tracing: ?bool = null, | |
| 806 | 732 | }; |
| 807 | 733 | |
| 808 | 734 | pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile { |
| 809 | if (options.root_module != null and options.target != null) { | |
| 810 | @panic("`root_module` and `target` cannot both be populated"); | |
| 811 | } | |
| 812 | 735 | return .create(b, .{ |
| 813 | 736 | .name = options.name, |
| 814 | .root_module = options.root_module orelse b.createModule(.{ | |
| 815 | .root_source_file = options.root_source_file, | |
| 816 | .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), | |
| 817 | .optimize = options.optimize, | |
| 818 | .link_libc = options.link_libc, | |
| 819 | .single_threaded = options.single_threaded, | |
| 820 | .pic = options.pic, | |
| 821 | .strip = options.strip, | |
| 822 | .unwind_tables = options.unwind_tables, | |
| 823 | .omit_frame_pointer = options.omit_frame_pointer, | |
| 824 | .sanitize_thread = options.sanitize_thread, | |
| 825 | .error_tracing = options.error_tracing, | |
| 826 | .code_model = options.code_model, | |
| 827 | }), | |
| 737 | .root_module = options.root_module, | |
| 828 | 738 | .kind = .obj, |
| 829 | 739 | .max_rss = options.max_rss, |
| 830 | 740 | .use_llvm = options.use_llvm, |
| ... | ... | @@ -833,153 +743,6 @@ pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile { |
| 833 | 743 | }); |
| 834 | 744 | } |
| 835 | 745 | |
| 836 | pub const SharedLibraryOptions = struct { | |
| 837 | name: []const u8, | |
| 838 | version: ?std.SemanticVersion = null, | |
| 839 | max_rss: usize = 0, | |
| 840 | use_llvm: ?bool = null, | |
| 841 | use_lld: ?bool = null, | |
| 842 | zig_lib_dir: ?LazyPath = null, | |
| 843 | /// Embed a `.manifest` file in the compilation if the object format supports it. | |
| 844 | /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference | |
| 845 | /// Manifest files must have the extension `.manifest`. | |
| 846 | /// Can be set regardless of target. The `.manifest` file will be ignored | |
| 847 | /// if the target object format does not support embedded manifests. | |
| 848 | win32_manifest: ?LazyPath = null, | |
| 849 | ||
| 850 | /// Prefer populating this field (using e.g. `createModule`) instead of populating | |
| 851 | /// the following fields (`root_source_file` etc). In a future release, those fields | |
| 852 | /// will be removed, and this field will become non-optional. | |
| 853 | root_module: ?*Module = null, | |
| 854 | ||
| 855 | /// Deprecated; prefer populating `root_module`. | |
| 856 | root_source_file: ?LazyPath = null, | |
| 857 | /// Deprecated; prefer populating `root_module`. | |
| 858 | target: ?ResolvedTarget = null, | |
| 859 | /// Deprecated; prefer populating `root_module`. | |
| 860 | optimize: std.builtin.OptimizeMode = .Debug, | |
| 861 | /// Deprecated; prefer populating `root_module`. | |
| 862 | code_model: std.builtin.CodeModel = .default, | |
| 863 | /// Deprecated; prefer populating `root_module`. | |
| 864 | link_libc: ?bool = null, | |
| 865 | /// Deprecated; prefer populating `root_module`. | |
| 866 | single_threaded: ?bool = null, | |
| 867 | /// Deprecated; prefer populating `root_module`. | |
| 868 | pic: ?bool = null, | |
| 869 | /// Deprecated; prefer populating `root_module`. | |
| 870 | strip: ?bool = null, | |
| 871 | /// Deprecated; prefer populating `root_module`. | |
| 872 | unwind_tables: ?std.builtin.UnwindTables = null, | |
| 873 | /// Deprecated; prefer populating `root_module`. | |
| 874 | omit_frame_pointer: ?bool = null, | |
| 875 | /// Deprecated; prefer populating `root_module`. | |
| 876 | sanitize_thread: ?bool = null, | |
| 877 | /// Deprecated; prefer populating `root_module`. | |
| 878 | error_tracing: ?bool = null, | |
| 879 | }; | |
| 880 | ||
| 881 | /// Deprecated: use `b.addLibrary(.{ ..., .linkage = .dynamic })` instead. | |
| 882 | pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *Step.Compile { | |
| 883 | if (options.root_module != null and options.target != null) { | |
| 884 | @panic("`root_module` and `target` cannot both be populated"); | |
| 885 | } | |
| 886 | return .create(b, .{ | |
| 887 | .name = options.name, | |
| 888 | .root_module = options.root_module orelse b.createModule(.{ | |
| 889 | .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), | |
| 890 | .optimize = options.optimize, | |
| 891 | .root_source_file = options.root_source_file, | |
| 892 | .link_libc = options.link_libc, | |
| 893 | .single_threaded = options.single_threaded, | |
| 894 | .pic = options.pic, | |
| 895 | .strip = options.strip, | |
| 896 | .unwind_tables = options.unwind_tables, | |
| 897 | .omit_frame_pointer = options.omit_frame_pointer, | |
| 898 | .sanitize_thread = options.sanitize_thread, | |
| 899 | .error_tracing = options.error_tracing, | |
| 900 | .code_model = options.code_model, | |
| 901 | }), | |
| 902 | .kind = .lib, | |
| 903 | .linkage = .dynamic, | |
| 904 | .version = options.version, | |
| 905 | .max_rss = options.max_rss, | |
| 906 | .use_llvm = options.use_llvm, | |
| 907 | .use_lld = options.use_lld, | |
| 908 | .zig_lib_dir = options.zig_lib_dir, | |
| 909 | .win32_manifest = options.win32_manifest, | |
| 910 | }); | |
| 911 | } | |
| 912 | ||
| 913 | pub const StaticLibraryOptions = struct { | |
| 914 | name: []const u8, | |
| 915 | version: ?std.SemanticVersion = null, | |
| 916 | max_rss: usize = 0, | |
| 917 | use_llvm: ?bool = null, | |
| 918 | use_lld: ?bool = null, | |
| 919 | zig_lib_dir: ?LazyPath = null, | |
| 920 | ||
| 921 | /// Prefer populating this field (using e.g. `createModule`) instead of populating | |
| 922 | /// the following fields (`root_source_file` etc). In a future release, those fields | |
| 923 | /// will be removed, and this field will become non-optional. | |
| 924 | root_module: ?*Module = null, | |
| 925 | ||
| 926 | /// Deprecated; prefer populating `root_module`. | |
| 927 | root_source_file: ?LazyPath = null, | |
| 928 | /// Deprecated; prefer populating `root_module`. | |
| 929 | target: ?ResolvedTarget = null, | |
| 930 | /// Deprecated; prefer populating `root_module`. | |
| 931 | optimize: std.builtin.OptimizeMode = .Debug, | |
| 932 | /// Deprecated; prefer populating `root_module`. | |
| 933 | code_model: std.builtin.CodeModel = .default, | |
| 934 | /// Deprecated; prefer populating `root_module`. | |
| 935 | link_libc: ?bool = null, | |
| 936 | /// Deprecated; prefer populating `root_module`. | |
| 937 | single_threaded: ?bool = null, | |
| 938 | /// Deprecated; prefer populating `root_module`. | |
| 939 | pic: ?bool = null, | |
| 940 | /// Deprecated; prefer populating `root_module`. | |
| 941 | strip: ?bool = null, | |
| 942 | /// Deprecated; prefer populating `root_module`. | |
| 943 | unwind_tables: ?std.builtin.UnwindTables = null, | |
| 944 | /// Deprecated; prefer populating `root_module`. | |
| 945 | omit_frame_pointer: ?bool = null, | |
| 946 | /// Deprecated; prefer populating `root_module`. | |
| 947 | sanitize_thread: ?bool = null, | |
| 948 | /// Deprecated; prefer populating `root_module`. | |
| 949 | error_tracing: ?bool = null, | |
| 950 | }; | |
| 951 | ||
| 952 | /// Deprecated: use `b.addLibrary(.{ ..., .linkage = .static })` instead. | |
| 953 | pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *Step.Compile { | |
| 954 | if (options.root_module != null and options.target != null) { | |
| 955 | @panic("`root_module` and `target` cannot both be populated"); | |
| 956 | } | |
| 957 | return .create(b, .{ | |
| 958 | .name = options.name, | |
| 959 | .root_module = options.root_module orelse b.createModule(.{ | |
| 960 | .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), | |
| 961 | .optimize = options.optimize, | |
| 962 | .root_source_file = options.root_source_file, | |
| 963 | .link_libc = options.link_libc, | |
| 964 | .single_threaded = options.single_threaded, | |
| 965 | .pic = options.pic, | |
| 966 | .strip = options.strip, | |
| 967 | .unwind_tables = options.unwind_tables, | |
| 968 | .omit_frame_pointer = options.omit_frame_pointer, | |
| 969 | .sanitize_thread = options.sanitize_thread, | |
| 970 | .error_tracing = options.error_tracing, | |
| 971 | .code_model = options.code_model, | |
| 972 | }), | |
| 973 | .kind = .lib, | |
| 974 | .linkage = .static, | |
| 975 | .version = options.version, | |
| 976 | .max_rss = options.max_rss, | |
| 977 | .use_llvm = options.use_llvm, | |
| 978 | .use_lld = options.use_lld, | |
| 979 | .zig_lib_dir = options.zig_lib_dir, | |
| 980 | }); | |
| 981 | } | |
| 982 | ||
| 983 | 746 | pub const LibraryOptions = struct { |
| 984 | 747 | linkage: std.builtin.LinkMode = .static, |
| 985 | 748 | name: []const u8, |
| ... | ... | @@ -1014,9 +777,8 @@ pub fn addLibrary(b: *Build, options: LibraryOptions) *Step.Compile { |
| 1014 | 777 | |
| 1015 | 778 | pub const TestOptions = struct { |
| 1016 | 779 | name: []const u8 = "test", |
| 780 | root_module: *Module, | |
| 1017 | 781 | max_rss: usize = 0, |
| 1018 | /// Deprecated; use `.filters = &.{filter}` instead of `.filter = filter`. | |
| 1019 | filter: ?[]const u8 = null, | |
| 1020 | 782 | filters: []const []const u8 = &.{}, |
| 1021 | 783 | test_runner: ?Step.Compile.TestRunner = null, |
| 1022 | 784 | use_llvm: ?bool = null, |
| ... | ... | @@ -1026,38 +788,6 @@ pub const TestOptions = struct { |
| 1026 | 788 | /// The object must be linked separately. |
| 1027 | 789 | /// Usually used in conjunction with a custom `test_runner`. |
| 1028 | 790 | emit_object: bool = false, |
| 1029 | ||
| 1030 | /// Prefer populating this field (using e.g. `createModule`) instead of populating | |
| 1031 | /// the following fields (`root_source_file` etc). In a future release, those fields | |
| 1032 | /// will be removed, and this field will become non-optional. | |
| 1033 | root_module: ?*Module = null, | |
| 1034 | ||
| 1035 | /// Deprecated; prefer populating `root_module`. | |
| 1036 | root_source_file: ?LazyPath = null, | |
| 1037 | /// Deprecated; prefer populating `root_module`. | |
| 1038 | target: ?ResolvedTarget = null, | |
| 1039 | /// Deprecated; prefer populating `root_module`. | |
| 1040 | optimize: std.builtin.OptimizeMode = .Debug, | |
| 1041 | /// Deprecated; prefer populating `root_module`. | |
| 1042 | version: ?std.SemanticVersion = null, | |
| 1043 | /// Deprecated; prefer populating `root_module`. | |
| 1044 | link_libc: ?bool = null, | |
| 1045 | /// Deprecated; prefer populating `root_module`. | |
| 1046 | link_libcpp: ?bool = null, | |
| 1047 | /// Deprecated; prefer populating `root_module`. | |
| 1048 | single_threaded: ?bool = null, | |
| 1049 | /// Deprecated; prefer populating `root_module`. | |
| 1050 | pic: ?bool = null, | |
| 1051 | /// Deprecated; prefer populating `root_module`. | |
| 1052 | strip: ?bool = null, | |
| 1053 | /// Deprecated; prefer populating `root_module`. | |
| 1054 | unwind_tables: ?std.builtin.UnwindTables = null, | |
| 1055 | /// Deprecated; prefer populating `root_module`. | |
| 1056 | omit_frame_pointer: ?bool = null, | |
| 1057 | /// Deprecated; prefer populating `root_module`. | |
| 1058 | sanitize_thread: ?bool = null, | |
| 1059 | /// Deprecated; prefer populating `root_module`. | |
| 1060 | error_tracing: ?bool = null, | |
| 1061 | 791 | }; |
| 1062 | 792 | |
| 1063 | 793 | /// Creates an executable containing unit tests. |
| ... | ... | @@ -1069,33 +799,12 @@ pub const TestOptions = struct { |
| 1069 | 799 | /// two steps are separated because they are independently configured and |
| 1070 | 800 | /// cached. |
| 1071 | 801 | pub fn addTest(b: *Build, options: TestOptions) *Step.Compile { |
| 1072 | if (options.root_module != null and options.root_source_file != null) { | |
| 1073 | @panic("`root_module` and `root_source_file` cannot both be populated"); | |
| 1074 | } | |
| 1075 | 802 | return .create(b, .{ |
| 1076 | 803 | .name = options.name, |
| 1077 | 804 | .kind = if (options.emit_object) .test_obj else .@"test", |
| 1078 | .root_module = options.root_module orelse b.createModule(.{ | |
| 1079 | .root_source_file = options.root_source_file orelse @panic("`root_module` and `root_source_file` cannot both be null"), | |
| 1080 | .target = options.target orelse b.graph.host, | |
| 1081 | .optimize = options.optimize, | |
| 1082 | .link_libc = options.link_libc, | |
| 1083 | .link_libcpp = options.link_libcpp, | |
| 1084 | .single_threaded = options.single_threaded, | |
| 1085 | .pic = options.pic, | |
| 1086 | .strip = options.strip, | |
| 1087 | .unwind_tables = options.unwind_tables, | |
| 1088 | .omit_frame_pointer = options.omit_frame_pointer, | |
| 1089 | .sanitize_thread = options.sanitize_thread, | |
| 1090 | .error_tracing = options.error_tracing, | |
| 1091 | }), | |
| 805 | .root_module = options.root_module, | |
| 1092 | 806 | .max_rss = options.max_rss, |
| 1093 | .filters = if (options.filter != null and options.filters.len > 0) filters: { | |
| 1094 | const filters = b.allocator.alloc([]const u8, 1 + options.filters.len) catch @panic("OOM"); | |
| 1095 | filters[0] = b.dupe(options.filter.?); | |
| 1096 | for (filters[1..], options.filters) |*dest, source| dest.* = b.dupe(source); | |
| 1097 | break :filters filters; | |
| 1098 | } else b.dupeStrings(if (options.filter) |filter| &.{filter} else options.filters), | |
| 807 | .filters = b.dupeStrings(options.filters), | |
| 1099 | 808 | .test_runner = options.test_runner, |
| 1100 | 809 | .use_llvm = options.use_llvm, |
| 1101 | 810 | .use_lld = options.use_lld, |
| ... | ... | @@ -1114,22 +823,6 @@ pub const AssemblyOptions = struct { |
| 1114 | 823 | zig_lib_dir: ?LazyPath = null, |
| 1115 | 824 | }; |
| 1116 | 825 | |
| 1117 | /// Deprecated; prefer using `addObject` where the `root_module` has an empty | |
| 1118 | /// `root_source_file` and contains an assembly file via `Module.addAssemblyFile`. | |
| 1119 | pub fn addAssembly(b: *Build, options: AssemblyOptions) *Step.Compile { | |
| 1120 | const root_module = b.createModule(.{ | |
| 1121 | .target = options.target, | |
| 1122 | .optimize = options.optimize, | |
| 1123 | }); | |
| 1124 | root_module.addAssemblyFile(options.source_file); | |
| 1125 | return b.addObject(.{ | |
| 1126 | .name = options.name, | |
| 1127 | .max_rss = options.max_rss, | |
| 1128 | .zig_lib_dir = options.zig_lib_dir, | |
| 1129 | .root_module = root_module, | |
| 1130 | }); | |
| 1131 | } | |
| 1132 | ||
| 1133 | 826 | /// This function creates a module and adds it to the package's module set, making |
| 1134 | 827 | /// it available to other packages which depend on this one. |
| 1135 | 828 | /// `createModule` can be used instead to create a private module. |
lib/std/Build/Cache.zig+4-4| ... | ... | @@ -1326,7 +1326,7 @@ test "cache file and then recall it" { |
| 1326 | 1326 | // Wait for file timestamps to tick |
| 1327 | 1327 | const initial_time = try testGetCurrentFileTimestamp(tmp.dir); |
| 1328 | 1328 | while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time) { |
| 1329 | std.time.sleep(1); | |
| 1329 | std.Thread.sleep(1); | |
| 1330 | 1330 | } |
| 1331 | 1331 | |
| 1332 | 1332 | var digest1: HexDigest = undefined; |
| ... | ... | @@ -1389,7 +1389,7 @@ test "check that changing a file makes cache fail" { |
| 1389 | 1389 | // Wait for file timestamps to tick |
| 1390 | 1390 | const initial_time = try testGetCurrentFileTimestamp(tmp.dir); |
| 1391 | 1391 | while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time) { |
| 1392 | std.time.sleep(1); | |
| 1392 | std.Thread.sleep(1); | |
| 1393 | 1393 | } |
| 1394 | 1394 | |
| 1395 | 1395 | var digest1: HexDigest = undefined; |
| ... | ... | @@ -1501,7 +1501,7 @@ test "Manifest with files added after initial hash work" { |
| 1501 | 1501 | // Wait for file timestamps to tick |
| 1502 | 1502 | const initial_time = try testGetCurrentFileTimestamp(tmp.dir); |
| 1503 | 1503 | while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time) { |
| 1504 | std.time.sleep(1); | |
| 1504 | std.Thread.sleep(1); | |
| 1505 | 1505 | } |
| 1506 | 1506 | |
| 1507 | 1507 | var digest1: HexDigest = undefined; |
| ... | ... | @@ -1551,7 +1551,7 @@ test "Manifest with files added after initial hash work" { |
| 1551 | 1551 | // Wait for file timestamps to tick |
| 1552 | 1552 | const initial_time2 = try testGetCurrentFileTimestamp(tmp.dir); |
| 1553 | 1553 | while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time2) { |
| 1554 | std.time.sleep(1); | |
| 1554 | std.Thread.sleep(1); | |
| 1555 | 1555 | } |
| 1556 | 1556 | |
| 1557 | 1557 | { |
lib/std/Build/Step/ConfigHeader.zig+3-6| ... | ... | @@ -8,9 +8,6 @@ pub const Style = union(enum) { |
| 8 | 8 | /// A configure format supported by autotools that uses `#undef foo` to |
| 9 | 9 | /// mark lines that can be substituted with different values. |
| 10 | 10 | autoconf_undef: std.Build.LazyPath, |
| 11 | /// Deprecated. Renamed to `autoconf_undef`. | |
| 12 | /// To be removed after 0.14.0 is tagged. | |
| 13 | autoconf: std.Build.LazyPath, | |
| 14 | 11 | /// A configure format supported by autotools that uses `@FOO@` output variables. |
| 15 | 12 | autoconf_at: std.Build.LazyPath, |
| 16 | 13 | /// The configure format supported by CMake. It uses `@FOO@`, `${}` and |
| ... | ... | @@ -23,7 +20,7 @@ pub const Style = union(enum) { |
| 23 | 20 | |
| 24 | 21 | pub fn getPath(style: Style) ?std.Build.LazyPath { |
| 25 | 22 | switch (style) { |
| 26 | .autoconf_undef, .autoconf, .autoconf_at, .cmake => |s| return s, | |
| 23 | .autoconf_undef, .autoconf_at, .cmake => |s| return s, | |
| 27 | 24 | .blank, .nasm => return null, |
| 28 | 25 | } |
| 29 | 26 | } |
| ... | ... | @@ -205,7 +202,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { |
| 205 | 202 | const asm_generated_line = "; " ++ header_text ++ "\n"; |
| 206 | 203 | |
| 207 | 204 | switch (config_header.style) { |
| 208 | .autoconf_undef, .autoconf, .autoconf_at => |file_source| { | |
| 205 | .autoconf_undef, .autoconf_at => |file_source| { | |
| 209 | 206 | try bw.writeAll(c_generated_line); |
| 210 | 207 | const src_path = file_source.getPath2(b, step); |
| 211 | 208 | const contents = std.fs.cwd().readFileAlloc(arena, src_path, config_header.max_bytes) catch |err| { |
| ... | ... | @@ -214,7 +211,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { |
| 214 | 211 | }); |
| 215 | 212 | }; |
| 216 | 213 | switch (config_header.style) { |
| 217 | .autoconf_undef, .autoconf => try render_autoconf_undef(step, contents, bw, config_header.values, src_path), | |
| 214 | .autoconf_undef => try render_autoconf_undef(step, contents, bw, config_header.values, src_path), | |
| 218 | 215 | .autoconf_at => try render_autoconf_at(step, contents, &aw, config_header.values, src_path), |
| 219 | 216 | else => unreachable, |
| 220 | 217 | } |
lib/std/Build/Step/TranslateC.zig-13| ... | ... | @@ -63,19 +63,6 @@ pub fn getOutput(translate_c: *TranslateC) std.Build.LazyPath { |
| 63 | 63 | return .{ .generated = .{ .file = &translate_c.output_file } }; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | /// Deprecated: use `createModule` or `addModule` with `std.Build.addExecutable` instead. | |
| 67 | /// Creates a step to build an executable from the translated source. | |
| 68 | pub fn addExecutable(translate_c: *TranslateC, options: AddExecutableOptions) *Step.Compile { | |
| 69 | return translate_c.step.owner.addExecutable(.{ | |
| 70 | .root_source_file = translate_c.getOutput(), | |
| 71 | .name = options.name orelse "translated_c", | |
| 72 | .version = options.version, | |
| 73 | .target = options.target orelse translate_c.target, | |
| 74 | .optimize = options.optimize orelse translate_c.optimize, | |
| 75 | .linkage = options.linkage, | |
| 76 | }); | |
| 77 | } | |
| 78 | ||
| 79 | 66 | /// Creates a module from the translated source and adds it to the package's |
| 80 | 67 | /// module set making it available to other packages which depend on this one. |
| 81 | 68 | /// `createModule` can be used instead to create a private module. |
lib/std/Build/Watch.zig+1-1| ... | ... | @@ -4,7 +4,7 @@ const Watch = @This(); |
| 4 | 4 | const Step = std.Build.Step; |
| 5 | 5 | const Allocator = std.mem.Allocator; |
| 6 | 6 | const assert = std.debug.assert; |
| 7 | const fatal = std.zig.fatal; | |
| 7 | const fatal = std.process.fatal; | |
| 8 | 8 | |
| 9 | 9 | dir_table: DirTable, |
| 10 | 10 | os: Os, |
lib/std/Thread/Condition.zig+3-3| ... | ... | @@ -130,7 +130,7 @@ const SingleThreadedImpl = struct { |
| 130 | 130 | unreachable; // deadlock detected |
| 131 | 131 | }; |
| 132 | 132 | |
| 133 | std.time.sleep(timeout_ns); | |
| 133 | std.Thread.sleep(timeout_ns); | |
| 134 | 134 | return error.Timeout; |
| 135 | 135 | } |
| 136 | 136 | |
| ... | ... | @@ -348,7 +348,7 @@ test "wait and signal" { |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | while (true) { |
| 351 | std.time.sleep(100 * std.time.ns_per_ms); | |
| 351 | std.Thread.sleep(100 * std.time.ns_per_ms); | |
| 352 | 352 | |
| 353 | 353 | multi_wait.mutex.lock(); |
| 354 | 354 | defer multi_wait.mutex.unlock(); |
| ... | ... | @@ -405,7 +405,7 @@ test signal { |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | while (true) { |
| 408 | std.time.sleep(10 * std.time.ns_per_ms); | |
| 408 | std.Thread.sleep(10 * std.time.ns_per_ms); | |
| 409 | 409 | |
| 410 | 410 | signal_test.mutex.lock(); |
| 411 | 411 | defer signal_test.mutex.unlock(); |
lib/std/Thread/Futex.zig+1-1| ... | ... | @@ -116,7 +116,7 @@ const SingleThreadedImpl = struct { |
| 116 | 116 | unreachable; // deadlock detected |
| 117 | 117 | }; |
| 118 | 118 | |
| 119 | std.time.sleep(delay); | |
| 119 | std.Thread.sleep(delay); | |
| 120 | 120 | return error.Timeout; |
| 121 | 121 | } |
| 122 | 122 |
lib/std/Thread/ResetEvent.zig+1-1| ... | ... | @@ -74,7 +74,7 @@ const SingleThreadedImpl = struct { |
| 74 | 74 | unreachable; // deadlock detected |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | std.time.sleep(timeout_ns); | |
| 77 | std.Thread.sleep(timeout_ns); | |
| 78 | 78 | return error.Timeout; |
| 79 | 79 | } |
| 80 | 80 |
lib/std/ascii.zig-3| ... | ... | @@ -181,9 +181,6 @@ pub fn isAscii(c: u8) bool { |
| 181 | 181 | return c < 128; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | /// Deprecated: use `isAscii` | |
| 185 | pub const isASCII = isAscii; | |
| 186 | ||
| 187 | 184 | /// Uppercases the character and returns it as-is if already uppercase or not a letter. |
| 188 | 185 | pub fn toUpper(c: u8) u8 { |
| 189 | 186 | const mask = @as(u8, @intFromBool(isLower(c))) << 5; |
lib/std/atomic.zig-2| ... | ... | @@ -10,8 +10,6 @@ pub fn Value(comptime T: type) type { |
| 10 | 10 | return .{ .raw = value }; |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | pub const fence = @compileError("@fence is deprecated, use other atomics to establish ordering"); | |
| 14 | ||
| 15 | 13 | pub inline fn load(self: *const Self, comptime order: AtomicOrder) T { |
| 16 | 14 | return @atomicLoad(T, &self.raw, order); |
| 17 | 15 | } |
lib/std/builtin.zig-55| ... | ... | @@ -154,9 +154,6 @@ pub const OptimizeMode = enum { |
| 154 | 154 | ReleaseSmall, |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | /// Deprecated; use OptimizeMode. | |
| 158 | pub const Mode = OptimizeMode; | |
| 159 | ||
| 160 | 157 | /// The calling convention of a function defines how arguments and return values are passed, as well |
| 161 | 158 | /// as any other requirements which callers and callees must respect, such as register preservation |
| 162 | 159 | /// and stack alignment. |
| ... | ... | @@ -185,51 +182,6 @@ pub const CallingConvention = union(enum(u8)) { |
| 185 | 182 | else => unreachable, |
| 186 | 183 | }; |
| 187 | 184 | |
| 188 | /// Deprecated; use `.auto`. | |
| 189 | pub const Unspecified: CallingConvention = .auto; | |
| 190 | /// Deprecated; use `.c`. | |
| 191 | pub const C: CallingConvention = .c; | |
| 192 | /// Deprecated; use `.naked`. | |
| 193 | pub const Naked: CallingConvention = .naked; | |
| 194 | /// Deprecated; use `.@"inline"`. | |
| 195 | pub const Inline: CallingConvention = .@"inline"; | |
| 196 | /// Deprecated; use `.x86_64_interrupt`, `.x86_interrupt`, or `.avr_interrupt`. | |
| 197 | pub const Interrupt: CallingConvention = switch (builtin.target.cpu.arch) { | |
| 198 | .x86_64 => .{ .x86_64_interrupt = .{} }, | |
| 199 | .x86 => .{ .x86_interrupt = .{} }, | |
| 200 | .avr => .avr_interrupt, | |
| 201 | else => unreachable, | |
| 202 | }; | |
| 203 | /// Deprecated; use `.avr_signal`. | |
| 204 | pub const Signal: CallingConvention = .avr_signal; | |
| 205 | /// Deprecated; use `.x86_stdcall`. | |
| 206 | pub const Stdcall: CallingConvention = .{ .x86_stdcall = .{} }; | |
| 207 | /// Deprecated; use `.x86_fastcall`. | |
| 208 | pub const Fastcall: CallingConvention = .{ .x86_fastcall = .{} }; | |
| 209 | /// Deprecated; use `.x86_64_vectorcall`, `.x86_vectorcall`, or `aarch64_vfabi`. | |
| 210 | pub const Vectorcall: CallingConvention = switch (builtin.target.cpu.arch) { | |
| 211 | .x86_64 => .{ .x86_64_vectorcall = .{} }, | |
| 212 | .x86 => .{ .x86_vectorcall = .{} }, | |
| 213 | .aarch64, .aarch64_be => .{ .aarch64_vfabi = .{} }, | |
| 214 | else => unreachable, | |
| 215 | }; | |
| 216 | /// Deprecated; use `.x86_thiscall`. | |
| 217 | pub const Thiscall: CallingConvention = .{ .x86_thiscall = .{} }; | |
| 218 | /// Deprecated; use `.arm_aapcs`. | |
| 219 | pub const AAPCS: CallingConvention = .{ .arm_aapcs = .{} }; | |
| 220 | /// Deprecated; use `.arm_aapcs_vfp`. | |
| 221 | pub const AAPCSVFP: CallingConvention = .{ .arm_aapcs_vfp = .{} }; | |
| 222 | /// Deprecated; use `.x86_64_sysv`. | |
| 223 | pub const SysV: CallingConvention = .{ .x86_64_sysv = .{} }; | |
| 224 | /// Deprecated; use `.x86_64_win`. | |
| 225 | pub const Win64: CallingConvention = .{ .x86_64_win = .{} }; | |
| 226 | /// Deprecated; use `.kernel`. | |
| 227 | pub const Kernel: CallingConvention = .kernel; | |
| 228 | /// Deprecated; use `.spirv_fragment`. | |
| 229 | pub const Fragment: CallingConvention = .spirv_fragment; | |
| 230 | /// Deprecated; use `.spirv_vertex`. | |
| 231 | pub const Vertex: CallingConvention = .spirv_vertex; | |
| 232 | ||
| 233 | 185 | /// The default Zig calling convention when neither `export` nor `inline` is specified. |
| 234 | 186 | /// This calling convention makes no guarantees about stack alignment, registers, etc. |
| 235 | 187 | /// It can only be used within this Zig compilation unit. |
| ... | ... | @@ -1117,10 +1069,6 @@ pub const TestFn = struct { |
| 1117 | 1069 | func: *const fn () anyerror!void, |
| 1118 | 1070 | }; |
| 1119 | 1071 | |
| 1120 | /// Deprecated, use the `Panic` namespace instead. | |
| 1121 | /// To be deleted after 0.14.0 is released. | |
| 1122 | pub const PanicFn = fn ([]const u8, ?*StackTrace, ?usize) noreturn; | |
| 1123 | ||
| 1124 | 1072 | /// This namespace is used by the Zig compiler to emit various kinds of safety |
| 1125 | 1073 | /// panics. These can be overridden by making a public `panic` namespace in the |
| 1126 | 1074 | /// root source file. |
| ... | ... | @@ -1136,9 +1084,6 @@ pub const panic: type = p: { |
| 1136 | 1084 | } |
| 1137 | 1085 | break :p root.panic; |
| 1138 | 1086 | } |
| 1139 | if (@hasDecl(root, "Panic")) { | |
| 1140 | break :p root.Panic; // Deprecated; use `panic` instead. | |
| 1141 | } | |
| 1142 | 1087 | break :p switch (builtin.zig_backend) { |
| 1143 | 1088 | .stage2_powerpc, |
| 1144 | 1089 | .stage2_riscv64, |
lib/std/crypto.zig-18| ... | ... | @@ -101,7 +101,6 @@ pub const dh = struct { |
| 101 | 101 | pub const kem = struct { |
| 102 | 102 | pub const kyber_d00 = @import("crypto/ml_kem.zig").d00; |
| 103 | 103 | pub const ml_kem = @import("crypto/ml_kem.zig").nist; |
| 104 | pub const ml_kem_01 = @compileError("deprecated: final version of the specification has been published, use ml_kem instead"); | |
| 105 | 104 | }; |
| 106 | 105 | |
| 107 | 106 | /// Elliptic-curve arithmetic. |
| ... | ... | @@ -400,20 +399,3 @@ test secureZero { |
| 400 | 399 | |
| 401 | 400 | try std.testing.expectEqualSlices(u8, &a, &b); |
| 402 | 401 | } |
| 403 | ||
| 404 | /// Deprecated in favor of `std.crypto`. To be removed after Zig 0.14.0 is released. | |
| 405 | /// | |
| 406 | /// As a reminder, never use "utils" in a namespace (in any programming language). | |
| 407 | /// https://ziglang.org/documentation/0.13.0/#Avoid-Redundancy-in-Names | |
| 408 | pub const utils = struct { | |
| 409 | /// Deprecated in favor of `std.crypto.secureZero`. | |
| 410 | pub const secureZero = std.crypto.secureZero; | |
| 411 | /// Deprecated in favor of `std.crypto.timing_safe.eql`. | |
| 412 | pub const timingSafeEql = timing_safe.eql; | |
| 413 | /// Deprecated in favor of `std.crypto.timing_safe.compare`. | |
| 414 | pub const timingSafeCompare = timing_safe.compare; | |
| 415 | /// Deprecated in favor of `std.crypto.timing_safe.add`. | |
| 416 | pub const timingSafeAdd = timing_safe.add; | |
| 417 | /// Deprecated in favor of `std.crypto.timing_safe.sub`. | |
| 418 | pub const timingSafeSub = timing_safe.sub; | |
| 419 | }; |
lib/std/crypto/timing_safe.zig+1-1| ... | ... | @@ -265,7 +265,7 @@ test classify { |
| 265 | 265 | |
| 266 | 266 | // Comparing secret data must be done in constant time. The result |
| 267 | 267 | // is going to be considered as secret as well. |
| 268 | var res = std.crypto.utils.timingSafeEql([32]u8, out, secret); | |
| 268 | var res = std.crypto.timing_safe.eql([32]u8, out, secret); | |
| 269 | 269 | |
| 270 | 270 | // If we want to make a conditional jump based on a secret, |
| 271 | 271 | // it has to be declassified. |
lib/std/debug.zig-4| ... | ... | @@ -227,10 +227,6 @@ pub fn print(comptime fmt: []const u8, args: anytype) void { |
| 227 | 227 | nosuspend bw.print(fmt, args) catch return; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | pub fn getStderrMutex() *std.Thread.Mutex { | |
| 231 | @compileError("deprecated. call std.debug.lockStdErr() and std.debug.unlockStdErr() instead which will integrate properly with std.Progress"); | |
| 232 | } | |
| 233 | ||
| 234 | 230 | /// TODO multithreaded awareness |
| 235 | 231 | var self_debug_info: ?SelfInfo = null; |
| 236 | 232 |
lib/std/fs.zig-10| ... | ... | @@ -35,8 +35,6 @@ pub const realpathW = posix.realpathW; |
| 35 | 35 | pub const getAppDataDir = @import("fs/get_app_data_dir.zig").getAppDataDir; |
| 36 | 36 | pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirError; |
| 37 | 37 | |
| 38 | pub const MAX_PATH_BYTES = @compileError("deprecated; renamed to max_path_bytes"); | |
| 39 | ||
| 40 | 38 | /// The maximum length of a file path that the operating system will accept. |
| 41 | 39 | /// |
| 42 | 40 | /// Paths, including those returned from file system operations, may be longer |
| ... | ... | @@ -90,9 +88,6 @@ pub const max_name_bytes = switch (native_os) { |
| 90 | 88 | @compileError("NAME_MAX not implemented for " ++ @tagName(native_os)), |
| 91 | 89 | }; |
| 92 | 90 | |
| 93 | /// Deprecated: use `max_name_bytes` | |
| 94 | pub const MAX_NAME_BYTES = max_name_bytes; | |
| 95 | ||
| 96 | 91 | pub const base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".*; |
| 97 | 92 | |
| 98 | 93 | /// Base64 encoder, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem. |
| ... | ... | @@ -101,11 +96,6 @@ pub const base64_encoder = base64.Base64Encoder.init(base64_alphabet, null); |
| 101 | 96 | /// Base64 decoder, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem. |
| 102 | 97 | pub const base64_decoder = base64.Base64Decoder.init(base64_alphabet, null); |
| 103 | 98 | |
| 104 | /// Deprecated. Use `cwd().atomicSymLink()` instead. | |
| 105 | pub fn atomicSymLink(_: Allocator, existing_path: []const u8, new_path: []const u8) !void { | |
| 106 | try cwd().atomicSymLink(existing_path, new_path, .{}); | |
| 107 | } | |
| 108 | ||
| 109 | 99 | /// Same as `Dir.updateFile`, except asserts that both `source_path` and `dest_path` |
| 110 | 100 | /// are absolute. See `Dir.updateFile` for a function that operates on both |
| 111 | 101 | /// absolute and relative paths. |
lib/std/fs/Dir.zig-5| ... | ... | @@ -1402,9 +1402,6 @@ pub fn setAsCwd(self: Dir) !void { |
| 1402 | 1402 | try posix.fchdir(self.fd); |
| 1403 | 1403 | } |
| 1404 | 1404 | |
| 1405 | /// Deprecated: use `OpenOptions` | |
| 1406 | pub const OpenDirOptions = OpenOptions; | |
| 1407 | ||
| 1408 | 1405 | pub const OpenOptions = struct { |
| 1409 | 1406 | /// `true` means the opened directory can be used as the `Dir` parameter |
| 1410 | 1407 | /// for functions which operate based on an open directory handle. When `false`, |
| ... | ... | @@ -2459,8 +2456,6 @@ pub fn writeFile(self: Dir, options: WriteFileOptions) WriteFileError!void { |
| 2459 | 2456 | try file.writeAll(options.data); |
| 2460 | 2457 | } |
| 2461 | 2458 | |
| 2462 | pub const writeFile2 = @compileError("deprecated; renamed to writeFile"); | |
| 2463 | ||
| 2464 | 2459 | pub const AccessError = posix.AccessError; |
| 2465 | 2460 | |
| 2466 | 2461 | /// Test accessing `sub_path`. |
lib/std/hash.zig+1-2| ... | ... | @@ -81,9 +81,8 @@ fn uint16(input: u16) u16 { |
| 81 | 81 | return x; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | /// DEPRECATED: use std.hash.int() | |
| 85 | 84 | /// Source: https://github.com/skeeto/hash-prospector |
| 86 | pub fn uint32(input: u32) u32 { | |
| 85 | fn uint32(input: u32) u32 { | |
| 87 | 86 | var x: u32 = input; |
| 88 | 87 | x = (x ^ (x >> 17)) *% 0xed5ad4bb; |
| 89 | 88 | x = (x ^ (x >> 11)) *% 0xac4c1b51; |
lib/std/hash/crc/impl.zig-10| ... | ... | @@ -100,13 +100,3 @@ pub fn Crc(comptime W: type, comptime algorithm: Algorithm(W)) type { |
| 100 | 100 | } |
| 101 | 101 | }; |
| 102 | 102 | } |
| 103 | ||
| 104 | pub const Polynomial = enum(u32) { | |
| 105 | IEEE = @compileError("use Crc with algorithm .Crc32IsoHdlc"), | |
| 106 | Castagnoli = @compileError("use Crc with algorithm .Crc32Iscsi"), | |
| 107 | Koopman = @compileError("use Crc with algorithm .Crc32Koopman"), | |
| 108 | _, | |
| 109 | }; | |
| 110 | ||
| 111 | pub const Crc32WithPoly = @compileError("use Crc instead"); | |
| 112 | pub const Crc32SmallWithPoly = @compileError("use Crc instead"); |
lib/std/leb128.zig-12| ... | ... | @@ -33,9 +33,6 @@ pub fn readUleb128(comptime T: type, reader: anytype) !T { |
| 33 | 33 | return @as(T, @truncate(value)); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | /// Deprecated: use `readUleb128` | |
| 37 | pub const readULEB128 = readUleb128; | |
| 38 | ||
| 39 | 36 | /// Write a single unsigned integer as unsigned LEB128 to the given writer. |
| 40 | 37 | pub fn writeUleb128(writer: anytype, arg: anytype) !void { |
| 41 | 38 | const Arg = @TypeOf(arg); |
| ... | ... | @@ -58,9 +55,6 @@ pub fn writeUleb128(writer: anytype, arg: anytype) !void { |
| 58 | 55 | } |
| 59 | 56 | } |
| 60 | 57 | |
| 61 | /// Deprecated: use `writeUleb128` | |
| 62 | pub const writeULEB128 = writeUleb128; | |
| 63 | ||
| 64 | 58 | /// Read a single signed LEB128 value from the given reader as type T, |
| 65 | 59 | /// or error.Overflow if the value cannot fit. |
| 66 | 60 | pub fn readIleb128(comptime T: type, reader: anytype) !T { |
| ... | ... | @@ -119,9 +113,6 @@ pub fn readIleb128(comptime T: type, reader: anytype) !T { |
| 119 | 113 | return @as(T, @truncate(result)); |
| 120 | 114 | } |
| 121 | 115 | |
| 122 | /// Deprecated: use `readIleb128` | |
| 123 | pub const readILEB128 = readIleb128; | |
| 124 | ||
| 125 | 116 | /// Write a single signed integer as signed LEB128 to the given writer. |
| 126 | 117 | pub fn writeIleb128(writer: anytype, arg: anytype) !void { |
| 127 | 118 | const Arg = @TypeOf(arg); |
| ... | ... | @@ -176,9 +167,6 @@ pub fn writeUnsignedExtended(slice: []u8, arg: anytype) void { |
| 176 | 167 | slice[slice.len - 1] = @as(u7, @intCast(value)); |
| 177 | 168 | } |
| 178 | 169 | |
| 179 | /// Deprecated: use `writeIleb128` | |
| 180 | pub const writeILEB128 = writeIleb128; | |
| 181 | ||
| 182 | 170 | test writeUnsignedFixed { |
| 183 | 171 | { |
| 184 | 172 | var buf: [4]u8 = undefined; |
lib/std/math/big/int.zig-6| ... | ... | @@ -2222,9 +2222,6 @@ pub const Const = struct { |
| 2222 | 2222 | TargetTooSmall, |
| 2223 | 2223 | }; |
| 2224 | 2224 | |
| 2225 | /// Deprecated; use `toInt`. | |
| 2226 | pub const to = toInt; | |
| 2227 | ||
| 2228 | 2225 | /// Convert `self` to `Int`. |
| 2229 | 2226 | /// |
| 2230 | 2227 | /// Returns an error if self cannot be narrowed into the requested type without truncation. |
| ... | ... | @@ -2855,9 +2852,6 @@ pub const Managed = struct { |
| 2855 | 2852 | |
| 2856 | 2853 | pub const ConvertError = Const.ConvertError; |
| 2857 | 2854 | |
| 2858 | /// Deprecated; use `toInt`. | |
| 2859 | pub const to = toInt; | |
| 2860 | ||
| 2861 | 2855 | /// Convert `self` to `Int`. |
| 2862 | 2856 | /// |
| 2863 | 2857 | /// Returns an error if self cannot be narrowed into the requested type without truncation. |
lib/std/math/big/int_test.zig+1-1| ... | ... | @@ -688,7 +688,7 @@ test "string set base 36" { |
| 688 | 688 | defer a.deinit(); |
| 689 | 689 | |
| 690 | 690 | try a.setString(36, "fifvthrv1mzt79ez9"); |
| 691 | try testing.expectEqual(123456789123456789123456789, try a.to(u128)); | |
| 691 | try testing.expectEqual(123456789123456789123456789, try a.toInt(u128)); | |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | test "string set bad char error" { |
lib/std/mem.zig-6| ... | ... | @@ -2258,8 +2258,6 @@ test byteSwapAllFields { |
| 2258 | 2258 | }, k); |
| 2259 | 2259 | } |
| 2260 | 2260 | |
| 2261 | pub const tokenize = @compileError("deprecated; use tokenizeAny, tokenizeSequence, or tokenizeScalar"); | |
| 2262 | ||
| 2263 | 2261 | /// Returns an iterator that iterates over the slices of `buffer` that are not |
| 2264 | 2262 | /// any of the items in `delimiters`. |
| 2265 | 2263 | /// |
| ... | ... | @@ -2458,8 +2456,6 @@ test "tokenize (reset)" { |
| 2458 | 2456 | } |
| 2459 | 2457 | } |
| 2460 | 2458 | |
| 2461 | pub const split = @compileError("deprecated; use splitSequence, splitAny, or splitScalar"); | |
| 2462 | ||
| 2463 | 2459 | /// Returns an iterator that iterates over the slices of `buffer` that |
| 2464 | 2460 | /// are separated by the byte sequence in `delimiter`. |
| 2465 | 2461 | /// |
| ... | ... | @@ -2659,8 +2655,6 @@ test "split (reset)" { |
| 2659 | 2655 | } |
| 2660 | 2656 | } |
| 2661 | 2657 | |
| 2662 | pub const splitBackwards = @compileError("deprecated; use splitBackwardsSequence, splitBackwardsAny, or splitBackwardsScalar"); | |
| 2663 | ||
| 2664 | 2658 | /// Returns an iterator that iterates backwards over the slices of `buffer` that |
| 2665 | 2659 | /// are separated by the sequence in `delimiter`. |
| 2666 | 2660 | /// |
lib/std/meta.zig-23| ... | ... | @@ -418,29 +418,6 @@ test fieldInfo { |
| 418 | 418 | try testing.expect(comptime uf.type == u8); |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | /// Deprecated: use @FieldType | |
| 422 | pub fn FieldType(comptime T: type, comptime field: FieldEnum(T)) type { | |
| 423 | return @FieldType(T, @tagName(field)); | |
| 424 | } | |
| 425 | ||
| 426 | test FieldType { | |
| 427 | const S = struct { | |
| 428 | a: u8, | |
| 429 | b: u16, | |
| 430 | }; | |
| 431 | ||
| 432 | const U = union { | |
| 433 | c: u32, | |
| 434 | d: *const u8, | |
| 435 | }; | |
| 436 | ||
| 437 | try testing.expect(FieldType(S, .a) == u8); | |
| 438 | try testing.expect(FieldType(S, .b) == u16); | |
| 439 | ||
| 440 | try testing.expect(FieldType(U, .c) == u32); | |
| 441 | try testing.expect(FieldType(U, .d) == *const u8); | |
| 442 | } | |
| 443 | ||
| 444 | 421 | pub fn fieldNames(comptime T: type) *const [fields(T).len][:0]const u8 { |
| 445 | 422 | return comptime blk: { |
| 446 | 423 | const fieldInfos = fields(T); |
lib/std/net.zig+1-3| ... | ... | @@ -214,8 +214,6 @@ pub const Address = extern union { |
| 214 | 214 | /// Sets SO_REUSEADDR and SO_REUSEPORT on POSIX. |
| 215 | 215 | /// Sets SO_REUSEADDR on Windows, which is roughly equivalent. |
| 216 | 216 | reuse_address: bool = false, |
| 217 | /// Deprecated. Does the same thing as reuse_address. | |
| 218 | reuse_port: bool = false, | |
| 219 | 217 | force_nonblocking: bool = false, |
| 220 | 218 | }; |
| 221 | 219 | |
| ... | ... | @@ -232,7 +230,7 @@ pub const Address = extern union { |
| 232 | 230 | }; |
| 233 | 231 | errdefer s.stream.close(); |
| 234 | 232 | |
| 235 | if (options.reuse_address or options.reuse_port) { | |
| 233 | if (options.reuse_address) { | |
| 236 | 234 | try posix.setsockopt( |
| 237 | 235 | sockfd, |
| 238 | 236 | posix.SOL.SOCKET, |
lib/std/net/test.zig+4-4| ... | ... | @@ -232,10 +232,10 @@ test "listen on an in use port" { |
| 232 | 232 | |
| 233 | 233 | const localhost = try net.Address.parseIp("127.0.0.1", 0); |
| 234 | 234 | |
| 235 | var server1 = try localhost.listen(.{ .reuse_port = true }); | |
| 235 | var server1 = try localhost.listen(.{ .reuse_address = true }); | |
| 236 | 236 | defer server1.deinit(); |
| 237 | 237 | |
| 238 | var server2 = try server1.listen_address.listen(.{ .reuse_port = true }); | |
| 238 | var server2 = try server1.listen_address.listen(.{ .reuse_address = true }); | |
| 239 | 239 | defer server2.deinit(); |
| 240 | 240 | } |
| 241 | 241 | |
| ... | ... | @@ -315,7 +315,7 @@ test "listen on a unix socket, send bytes, receive bytes" { |
| 315 | 315 | try testing.expectEqualSlices(u8, "Hello world!", buf[0..n]); |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | test "listen on a unix socket with reuse_port option" { | |
| 318 | test "listen on a unix socket with reuse_address option" { | |
| 319 | 319 | if (!net.has_unix_sockets) return error.SkipZigTest; |
| 320 | 320 | // Windows doesn't implement reuse port option. |
| 321 | 321 | if (builtin.os.tag == .windows) return error.SkipZigTest; |
| ... | ... | @@ -326,7 +326,7 @@ test "listen on a unix socket with reuse_port option" { |
| 326 | 326 | const socket_addr = try net.Address.initUnix(socket_path); |
| 327 | 327 | defer std.fs.cwd().deleteFile(socket_path) catch {}; |
| 328 | 328 | |
| 329 | var server = try socket_addr.listen(.{ .reuse_port = true }); | |
| 329 | var server = try socket_addr.listen(.{ .reuse_address = true }); | |
| 330 | 330 | server.deinit(); |
| 331 | 331 | } |
| 332 | 332 |
lib/std/os/windows.zig+1-4| ... | ... | @@ -146,7 +146,7 @@ pub fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HAN |
| 146 | 146 | // call has failed. There is not really a sane way to handle |
| 147 | 147 | // this other than retrying the creation after the OS finishes |
| 148 | 148 | // the deletion. |
| 149 | std.time.sleep(std.time.ns_per_ms); | |
| 149 | std.Thread.sleep(std.time.ns_per_ms); | |
| 150 | 150 | continue; |
| 151 | 151 | }, |
| 152 | 152 | .VIRUS_INFECTED, .VIRUS_DELETED => return error.AntivirusInterference, |
| ... | ... | @@ -2848,9 +2848,6 @@ pub const STD_OUTPUT_HANDLE = maxInt(DWORD) - 11 + 1; |
| 2848 | 2848 | /// The standard error device. Initially, this is the active console screen buffer, CONOUT$. |
| 2849 | 2849 | pub const STD_ERROR_HANDLE = maxInt(DWORD) - 12 + 1; |
| 2850 | 2850 | |
| 2851 | /// Deprecated; use `std.builtin.CallingConvention.winapi` instead. | |
| 2852 | pub const WINAPI: std.builtin.CallingConvention = .winapi; | |
| 2853 | ||
| 2854 | 2851 | pub const BOOL = c_int; |
| 2855 | 2852 | pub const BOOLEAN = BYTE; |
| 2856 | 2853 | pub const BYTE = u8; |
lib/std/posix/test.zig+1-1| ... | ... | @@ -1161,7 +1161,7 @@ test "POSIX file locking with fcntl" { |
| 1161 | 1161 | posix.exit(0); |
| 1162 | 1162 | } else { |
| 1163 | 1163 | // parent waits for child to get shared lock: |
| 1164 | std.time.sleep(1 * std.time.ns_per_ms); | |
| 1164 | std.Thread.sleep(1 * std.time.ns_per_ms); | |
| 1165 | 1165 | // parent expects deadlock when attempting to upgrade the shared lock to exclusive: |
| 1166 | 1166 | struct_flock.start = 1; |
| 1167 | 1167 | struct_flock.type = posix.F.WRLCK; |
lib/std/time.zig-3| ... | ... | @@ -8,9 +8,6 @@ const posix = std.posix; |
| 8 | 8 | |
| 9 | 9 | pub const epoch = @import("time/epoch.zig"); |
| 10 | 10 | |
| 11 | /// Deprecated: moved to std.Thread.sleep | |
| 12 | pub const sleep = std.Thread.sleep; | |
| 13 | ||
| 14 | 11 | /// Get a calendar timestamp, in seconds, relative to UTC 1970-01-01. |
| 15 | 12 | /// Precision of timing depends on the hardware and operating system. |
| 16 | 13 | /// The return value is signed because it is possible to have a date that is |
lib/std/unicode.zig-10| ... | ... | @@ -972,8 +972,6 @@ pub fn utf16LeToUtf8ArrayList(result: *std.ArrayList(u8), utf16le: []const u16) |
| 972 | 972 | return utf16LeToUtf8ArrayListImpl(result, utf16le, .cannot_encode_surrogate_half); |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | pub const utf16leToUtf8Alloc = @compileError("deprecated; renamed to utf16LeToUtf8Alloc"); | |
| 976 | ||
| 977 | 975 | /// Caller must free returned memory. |
| 978 | 976 | pub fn utf16LeToUtf8Alloc(allocator: mem.Allocator, utf16le: []const u16) Utf16LeToUtf8AllocError![]u8 { |
| 979 | 977 | // optimistically guess that it will all be ascii. |
| ... | ... | @@ -984,8 +982,6 @@ pub fn utf16LeToUtf8Alloc(allocator: mem.Allocator, utf16le: []const u16) Utf16L |
| 984 | 982 | return result.toOwnedSlice(); |
| 985 | 983 | } |
| 986 | 984 | |
| 987 | pub const utf16leToUtf8AllocZ = @compileError("deprecated; renamed to utf16LeToUtf8AllocZ"); | |
| 988 | ||
| 989 | 985 | /// Caller must free returned memory. |
| 990 | 986 | pub fn utf16LeToUtf8AllocZ(allocator: mem.Allocator, utf16le: []const u16) Utf16LeToUtf8AllocError![:0]u8 { |
| 991 | 987 | // optimistically guess that it will all be ascii (and allocate space for the null terminator) |
| ... | ... | @@ -1054,8 +1050,6 @@ fn utf16LeToUtf8Impl(utf8: []u8, utf16le: []const u16, comptime surrogates: Surr |
| 1054 | 1050 | return dest_index; |
| 1055 | 1051 | } |
| 1056 | 1052 | |
| 1057 | pub const utf16leToUtf8 = @compileError("deprecated; renamed to utf16LeToUtf8"); | |
| 1058 | ||
| 1059 | 1053 | pub fn utf16LeToUtf8(utf8: []u8, utf16le: []const u16) Utf16LeToUtf8Error!usize { |
| 1060 | 1054 | return utf16LeToUtf8Impl(utf8, utf16le, .cannot_encode_surrogate_half); |
| 1061 | 1055 | } |
| ... | ... | @@ -1175,8 +1169,6 @@ pub fn utf8ToUtf16LeAlloc(allocator: mem.Allocator, utf8: []const u8) error{ Inv |
| 1175 | 1169 | return result.toOwnedSlice(); |
| 1176 | 1170 | } |
| 1177 | 1171 | |
| 1178 | pub const utf8ToUtf16LeWithNull = @compileError("deprecated; renamed to utf8ToUtf16LeAllocZ"); | |
| 1179 | ||
| 1180 | 1172 | pub fn utf8ToUtf16LeAllocZ(allocator: mem.Allocator, utf8: []const u8) error{ InvalidUtf8, OutOfMemory }![:0]u16 { |
| 1181 | 1173 | // optimistically guess that it will not require surrogate pairs |
| 1182 | 1174 | var result = try std.ArrayList(u16).initCapacity(allocator, utf8.len + 1); |
| ... | ... | @@ -1487,8 +1479,6 @@ fn formatUtf16Le(utf16le: []const u16, writer: *std.io.Writer) std.io.Writer.Err |
| 1487 | 1479 | try writer.writeAll(buf[0..u8len]); |
| 1488 | 1480 | } |
| 1489 | 1481 | |
| 1490 | pub const fmtUtf16le = @compileError("deprecated; renamed to fmtUtf16Le"); | |
| 1491 | ||
| 1492 | 1482 | /// Return a Formatter for a (potentially ill-formed) UTF-16 LE string, |
| 1493 | 1483 | /// which will be converted to UTF-8 during formatting. |
| 1494 | 1484 | /// Unpaired surrogates are replaced by the replacement character (U+FFFD). |
lib/std/valgrind.zig-12| ... | ... | @@ -200,18 +200,6 @@ pub fn nonSimdCall3(func: fn (usize, usize, usize, usize) usize, a1: usize, a2: |
| 200 | 200 | return doClientRequestExpr(0, .ClientCall3, @intFromPtr(func), a1, a2, a3, 0); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | /// Deprecated: use `nonSimdCall0` | |
| 204 | pub const nonSIMDCall0 = nonSimdCall0; | |
| 205 | ||
| 206 | /// Deprecated: use `nonSimdCall1` | |
| 207 | pub const nonSIMDCall1 = nonSimdCall1; | |
| 208 | ||
| 209 | /// Deprecated: use `nonSimdCall2` | |
| 210 | pub const nonSIMDCall2 = nonSimdCall2; | |
| 211 | ||
| 212 | /// Deprecated: use `nonSimdCall3` | |
| 213 | pub const nonSIMDCall3 = nonSimdCall3; | |
| 214 | ||
| 215 | 203 | /// Counts the number of errors that have been recorded by a tool. Nb: |
| 216 | 204 | /// the tool must record the errors with VG_(maybe_record_error)() or |
| 217 | 205 | /// VG_(unique_error)() for them to be counted. |
lib/std/valgrind/callgrind.zig-2| ... | ... | @@ -10,8 +10,6 @@ pub const ClientRequest = enum(usize) { |
| 10 | 10 | StopInstrumentation, |
| 11 | 11 | }; |
| 12 | 12 | |
| 13 | pub const CallgrindClientRequest = @compileError("std.valgrind.callgrind.CallgrindClientRequest renamed to std.valgrind.callgrind.ClientRequest"); | |
| 14 | ||
| 15 | 13 | fn doClientRequestExpr(default: usize, request: ClientRequest, a1: usize, a2: usize, a3: usize, a4: usize, a5: usize) usize { |
| 16 | 14 | return valgrind.doClientRequest(default, @as(usize, @intCast(@intFromEnum(request))), a1, a2, a3, a4, a5); |
| 17 | 15 | } |
lib/std/valgrind/memcheck.zig-2| ... | ... | @@ -20,8 +20,6 @@ pub const ClientRequest = enum(usize) { |
| 20 | 20 | DisableAddrErrorReportingInRange, |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | pub const MemCheckClientRequest = @compileError("std.valgrind.memcheck.MemCheckClientRequest renamed to std.valgrind.memcheck.ClientRequest"); | |
| 24 | ||
| 25 | 23 | fn doClientRequestExpr(default: usize, request: ClientRequest, a1: usize, a2: usize, a3: usize, a4: usize, a5: usize) usize { |
| 26 | 24 | return valgrind.doClientRequest(default, @as(usize, @intCast(@intFromEnum(request))), a1, a2, a3, a4, a5); |
| 27 | 25 | } |
lib/std/zig.zig+6-10| ... | ... | @@ -17,7 +17,6 @@ pub const Zir = @import("zig/Zir.zig"); |
| 17 | 17 | pub const Zoir = @import("zig/Zoir.zig"); |
| 18 | 18 | pub const ZonGen = @import("zig/ZonGen.zig"); |
| 19 | 19 | pub const system = @import("zig/system.zig"); |
| 20 | pub const CrossTarget = @compileError("deprecated; use std.Target.Query"); | |
| 21 | 20 | pub const BuiltinFn = @import("zig/BuiltinFn.zig"); |
| 22 | 21 | pub const AstRlAnnotate = @import("zig/AstRlAnnotate.zig"); |
| 23 | 22 | pub const LibCInstallation = @import("zig/LibCInstallation.zig"); |
| ... | ... | @@ -604,7 +603,7 @@ pub fn putAstErrorsIntoBundle( |
| 604 | 603 | |
| 605 | 604 | pub fn resolveTargetQueryOrFatal(target_query: std.Target.Query) std.Target { |
| 606 | 605 | return std.zig.system.resolveTargetQuery(target_query) catch |err| |
| 607 | fatal("unable to resolve target: {s}", .{@errorName(err)}); | |
| 606 | std.process.fatal("unable to resolve target: {s}", .{@errorName(err)}); | |
| 608 | 607 | } |
| 609 | 608 | |
| 610 | 609 | pub fn parseTargetQueryOrReportFatalError( |
| ... | ... | @@ -628,7 +627,7 @@ pub fn parseTargetQueryOrReportFatalError( |
| 628 | 627 | @tagName(diags.arch.?), help_text.items, |
| 629 | 628 | }); |
| 630 | 629 | } |
| 631 | fatal("unknown CPU: '{s}'", .{diags.cpu_name.?}); | |
| 630 | std.process.fatal("unknown CPU: '{s}'", .{diags.cpu_name.?}); | |
| 632 | 631 | }, |
| 633 | 632 | error.UnknownCpuFeature => { |
| 634 | 633 | help: { |
| ... | ... | @@ -641,7 +640,7 @@ pub fn parseTargetQueryOrReportFatalError( |
| 641 | 640 | @tagName(diags.arch.?), help_text.items, |
| 642 | 641 | }); |
| 643 | 642 | } |
| 644 | fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); | |
| 643 | std.process.fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); | |
| 645 | 644 | }, |
| 646 | 645 | error.UnknownObjectFormat => { |
| 647 | 646 | help: { |
| ... | ... | @@ -652,7 +651,7 @@ pub fn parseTargetQueryOrReportFatalError( |
| 652 | 651 | } |
| 653 | 652 | std.log.info("available object formats:\n{s}", .{help_text.items}); |
| 654 | 653 | } |
| 655 | fatal("unknown object format: '{s}'", .{opts.object_format.?}); | |
| 654 | std.process.fatal("unknown object format: '{s}'", .{opts.object_format.?}); | |
| 656 | 655 | }, |
| 657 | 656 | error.UnknownArchitecture => { |
| 658 | 657 | help: { |
| ... | ... | @@ -663,17 +662,14 @@ pub fn parseTargetQueryOrReportFatalError( |
| 663 | 662 | } |
| 664 | 663 | std.log.info("available architectures:\n{s} native\n", .{help_text.items}); |
| 665 | 664 | } |
| 666 | fatal("unknown architecture: '{s}'", .{diags.unknown_architecture_name.?}); | |
| 665 | std.process.fatal("unknown architecture: '{s}'", .{diags.unknown_architecture_name.?}); | |
| 667 | 666 | }, |
| 668 | else => |e| fatal("unable to parse target query '{s}': {s}", .{ | |
| 667 | else => |e| std.process.fatal("unable to parse target query '{s}': {s}", .{ | |
| 669 | 668 | opts.arch_os_abi, @errorName(e), |
| 670 | 669 | }), |
| 671 | 670 | }; |
| 672 | 671 | } |
| 673 | 672 | |
| 674 | /// Deprecated; see `std.process.fatal`. | |
| 675 | pub const fatal = std.process.fatal; | |
| 676 | ||
| 677 | 673 | /// Collects all the environment variables that Zig could possibly inspect, so |
| 678 | 674 | /// that we can do reflection on this and print them with `zig env`. |
| 679 | 675 | pub const EnvVar = enum { |
lib/std/zig/c_translation.zig-3| ... | ... | @@ -254,9 +254,6 @@ test "sizeof" { |
| 254 | 254 | |
| 255 | 255 | pub const CIntLiteralBase = enum { decimal, octal, hex }; |
| 256 | 256 | |
| 257 | /// Deprecated: use `CIntLiteralBase` | |
| 258 | pub const CIntLiteralRadix = CIntLiteralBase; | |
| 259 | ||
| 260 | 257 | fn PromoteIntLiteralReturnType(comptime SuffixType: type, comptime number: comptime_int, comptime base: CIntLiteralBase) type { |
| 261 | 258 | const signed_decimal = [_]type{ c_int, c_long, c_longlong, c_ulonglong }; |
| 262 | 259 | const signed_oct_hex = [_]type{ c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong }; |
lib/std/zig/llvm/Builder.zig+27-27| ... | ... | @@ -10638,7 +10638,7 @@ fn fnTypeAssumeCapacity( |
| 10638 | 10638 | const Adapter = struct { |
| 10639 | 10639 | builder: *const Builder, |
| 10640 | 10640 | pub fn hash(_: @This(), key: Key) u32 { |
| 10641 | var hasher = std.hash.Wyhash.init(comptime std.hash.uint32(@intFromEnum(tag))); | |
| 10641 | var hasher = std.hash.Wyhash.init(comptime std.hash.int(@intFromEnum(tag))); | |
| 10642 | 10642 | hasher.update(std.mem.asBytes(&key.ret)); |
| 10643 | 10643 | hasher.update(std.mem.sliceAsBytes(key.params)); |
| 10644 | 10644 | return @truncate(hasher.final()); |
| ... | ... | @@ -10698,7 +10698,7 @@ fn vectorTypeAssumeCapacity( |
| 10698 | 10698 | builder: *const Builder, |
| 10699 | 10699 | pub fn hash(_: @This(), key: Type.Vector) u32 { |
| 10700 | 10700 | return @truncate(std.hash.Wyhash.hash( |
| 10701 | comptime std.hash.uint32(@intFromEnum(tag)), | |
| 10701 | comptime std.hash.int(@intFromEnum(tag)), | |
| 10702 | 10702 | std.mem.asBytes(&key), |
| 10703 | 10703 | )); |
| 10704 | 10704 | } |
| ... | ... | @@ -10727,7 +10727,7 @@ fn arrayTypeAssumeCapacity(self: *Builder, len: u64, child: Type) Type { |
| 10727 | 10727 | builder: *const Builder, |
| 10728 | 10728 | pub fn hash(_: @This(), key: Type.Vector) u32 { |
| 10729 | 10729 | return @truncate(std.hash.Wyhash.hash( |
| 10730 | comptime std.hash.uint32(@intFromEnum(Type.Tag.small_array)), | |
| 10730 | comptime std.hash.int(@intFromEnum(Type.Tag.small_array)), | |
| 10731 | 10731 | std.mem.asBytes(&key), |
| 10732 | 10732 | )); |
| 10733 | 10733 | } |
| ... | ... | @@ -10753,7 +10753,7 @@ fn arrayTypeAssumeCapacity(self: *Builder, len: u64, child: Type) Type { |
| 10753 | 10753 | builder: *const Builder, |
| 10754 | 10754 | pub fn hash(_: @This(), key: Type.Array) u32 { |
| 10755 | 10755 | return @truncate(std.hash.Wyhash.hash( |
| 10756 | comptime std.hash.uint32(@intFromEnum(Type.Tag.array)), | |
| 10756 | comptime std.hash.int(@intFromEnum(Type.Tag.array)), | |
| 10757 | 10757 | std.mem.asBytes(&key), |
| 10758 | 10758 | )); |
| 10759 | 10759 | } |
| ... | ... | @@ -10794,7 +10794,7 @@ fn structTypeAssumeCapacity( |
| 10794 | 10794 | builder: *const Builder, |
| 10795 | 10795 | pub fn hash(_: @This(), key: []const Type) u32 { |
| 10796 | 10796 | return @truncate(std.hash.Wyhash.hash( |
| 10797 | comptime std.hash.uint32(@intFromEnum(tag)), | |
| 10797 | comptime std.hash.int(@intFromEnum(tag)), | |
| 10798 | 10798 | std.mem.sliceAsBytes(key), |
| 10799 | 10799 | )); |
| 10800 | 10800 | } |
| ... | ... | @@ -10826,7 +10826,7 @@ fn opaqueTypeAssumeCapacity(self: *Builder, name: String) Type { |
| 10826 | 10826 | builder: *const Builder, |
| 10827 | 10827 | pub fn hash(_: @This(), key: String) u32 { |
| 10828 | 10828 | return @truncate(std.hash.Wyhash.hash( |
| 10829 | comptime std.hash.uint32(@intFromEnum(Type.Tag.named_structure)), | |
| 10829 | comptime std.hash.int(@intFromEnum(Type.Tag.named_structure)), | |
| 10830 | 10830 | std.mem.asBytes(&key), |
| 10831 | 10831 | )); |
| 10832 | 10832 | } |
| ... | ... | @@ -10887,7 +10887,7 @@ fn getOrPutTypeNoExtraAssumeCapacity(self: *Builder, item: Type.Item) struct { n |
| 10887 | 10887 | builder: *const Builder, |
| 10888 | 10888 | pub fn hash(_: @This(), key: Type.Item) u32 { |
| 10889 | 10889 | return @truncate(std.hash.Wyhash.hash( |
| 10890 | comptime std.hash.uint32(@intFromEnum(Type.Tag.simple)), | |
| 10890 | comptime std.hash.int(@intFromEnum(Type.Tag.simple)), | |
| 10891 | 10891 | std.mem.asBytes(&key), |
| 10892 | 10892 | )); |
| 10893 | 10893 | } |
| ... | ... | @@ -11021,7 +11021,7 @@ fn bigIntConstAssumeCapacity( |
| 11021 | 11021 | const Adapter = struct { |
| 11022 | 11022 | builder: *const Builder, |
| 11023 | 11023 | pub fn hash(_: @This(), key: Key) u32 { |
| 11024 | var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); | |
| 11024 | var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); | |
| 11025 | 11025 | hasher.update(std.mem.asBytes(&key.type)); |
| 11026 | 11026 | hasher.update(std.mem.sliceAsBytes(key.limbs)); |
| 11027 | 11027 | return @truncate(hasher.final()); |
| ... | ... | @@ -11084,7 +11084,7 @@ fn doubleConstAssumeCapacity(self: *Builder, val: f64) Constant { |
| 11084 | 11084 | builder: *const Builder, |
| 11085 | 11085 | pub fn hash(_: @This(), key: f64) u32 { |
| 11086 | 11086 | return @truncate(std.hash.Wyhash.hash( |
| 11087 | comptime std.hash.uint32(@intFromEnum(Constant.Tag.double)), | |
| 11087 | comptime std.hash.int(@intFromEnum(Constant.Tag.double)), | |
| 11088 | 11088 | std.mem.asBytes(&key), |
| 11089 | 11089 | )); |
| 11090 | 11090 | } |
| ... | ... | @@ -11115,7 +11115,7 @@ fn fp128ConstAssumeCapacity(self: *Builder, val: f128) Constant { |
| 11115 | 11115 | builder: *const Builder, |
| 11116 | 11116 | pub fn hash(_: @This(), key: f128) u32 { |
| 11117 | 11117 | return @truncate(std.hash.Wyhash.hash( |
| 11118 | comptime std.hash.uint32(@intFromEnum(Constant.Tag.fp128)), | |
| 11118 | comptime std.hash.int(@intFromEnum(Constant.Tag.fp128)), | |
| 11119 | 11119 | std.mem.asBytes(&key), |
| 11120 | 11120 | )); |
| 11121 | 11121 | } |
| ... | ... | @@ -11149,7 +11149,7 @@ fn x86_fp80ConstAssumeCapacity(self: *Builder, val: f80) Constant { |
| 11149 | 11149 | builder: *const Builder, |
| 11150 | 11150 | pub fn hash(_: @This(), key: f80) u32 { |
| 11151 | 11151 | return @truncate(std.hash.Wyhash.hash( |
| 11152 | comptime std.hash.uint32(@intFromEnum(Constant.Tag.x86_fp80)), | |
| 11152 | comptime std.hash.int(@intFromEnum(Constant.Tag.x86_fp80)), | |
| 11153 | 11153 | std.mem.asBytes(&key)[0..10], |
| 11154 | 11154 | )); |
| 11155 | 11155 | } |
| ... | ... | @@ -11182,7 +11182,7 @@ fn ppc_fp128ConstAssumeCapacity(self: *Builder, val: [2]f64) Constant { |
| 11182 | 11182 | builder: *const Builder, |
| 11183 | 11183 | pub fn hash(_: @This(), key: [2]f64) u32 { |
| 11184 | 11184 | return @truncate(std.hash.Wyhash.hash( |
| 11185 | comptime std.hash.uint32(@intFromEnum(Constant.Tag.ppc_fp128)), | |
| 11185 | comptime std.hash.int(@intFromEnum(Constant.Tag.ppc_fp128)), | |
| 11186 | 11186 | std.mem.asBytes(&key), |
| 11187 | 11187 | )); |
| 11188 | 11188 | } |
| ... | ... | @@ -11317,7 +11317,7 @@ fn splatConstAssumeCapacity(self: *Builder, ty: Type, val: Constant) Constant { |
| 11317 | 11317 | builder: *const Builder, |
| 11318 | 11318 | pub fn hash(_: @This(), key: Constant.Splat) u32 { |
| 11319 | 11319 | return @truncate(std.hash.Wyhash.hash( |
| 11320 | comptime std.hash.uint32(@intFromEnum(Constant.Tag.splat)), | |
| 11320 | comptime std.hash.int(@intFromEnum(Constant.Tag.splat)), | |
| 11321 | 11321 | std.mem.asBytes(&key), |
| 11322 | 11322 | )); |
| 11323 | 11323 | } |
| ... | ... | @@ -11420,7 +11420,7 @@ fn blockAddrConstAssumeCapacity( |
| 11420 | 11420 | builder: *const Builder, |
| 11421 | 11421 | pub fn hash(_: @This(), key: Constant.BlockAddress) u32 { |
| 11422 | 11422 | return @truncate(std.hash.Wyhash.hash( |
| 11423 | comptime std.hash.uint32(@intFromEnum(Constant.Tag.blockaddress)), | |
| 11423 | comptime std.hash.int(@intFromEnum(Constant.Tag.blockaddress)), | |
| 11424 | 11424 | std.mem.asBytes(&key), |
| 11425 | 11425 | )); |
| 11426 | 11426 | } |
| ... | ... | @@ -11546,7 +11546,7 @@ fn castConstAssumeCapacity(self: *Builder, tag: Constant.Tag, val: Constant, ty: |
| 11546 | 11546 | builder: *const Builder, |
| 11547 | 11547 | pub fn hash(_: @This(), key: Key) u32 { |
| 11548 | 11548 | return @truncate(std.hash.Wyhash.hash( |
| 11549 | std.hash.uint32(@intFromEnum(key.tag)), | |
| 11549 | std.hash.int(@intFromEnum(key.tag)), | |
| 11550 | 11550 | std.mem.asBytes(&key.cast), |
| 11551 | 11551 | )); |
| 11552 | 11552 | } |
| ... | ... | @@ -11621,7 +11621,7 @@ fn gepConstAssumeCapacity( |
| 11621 | 11621 | const Adapter = struct { |
| 11622 | 11622 | builder: *const Builder, |
| 11623 | 11623 | pub fn hash(_: @This(), key: Key) u32 { |
| 11624 | var hasher = std.hash.Wyhash.init(comptime std.hash.uint32(@intFromEnum(tag))); | |
| 11624 | var hasher = std.hash.Wyhash.init(comptime std.hash.int(@intFromEnum(tag))); | |
| 11625 | 11625 | hasher.update(std.mem.asBytes(&key.type)); |
| 11626 | 11626 | hasher.update(std.mem.asBytes(&key.base)); |
| 11627 | 11627 | hasher.update(std.mem.asBytes(&key.inrange)); |
| ... | ... | @@ -11685,7 +11685,7 @@ fn binConstAssumeCapacity( |
| 11685 | 11685 | builder: *const Builder, |
| 11686 | 11686 | pub fn hash(_: @This(), key: Key) u32 { |
| 11687 | 11687 | return @truncate(std.hash.Wyhash.hash( |
| 11688 | std.hash.uint32(@intFromEnum(key.tag)), | |
| 11688 | std.hash.int(@intFromEnum(key.tag)), | |
| 11689 | 11689 | std.mem.asBytes(&key.extra), |
| 11690 | 11690 | )); |
| 11691 | 11691 | } |
| ... | ... | @@ -11723,7 +11723,7 @@ fn asmConstAssumeCapacity( |
| 11723 | 11723 | builder: *const Builder, |
| 11724 | 11724 | pub fn hash(_: @This(), key: Key) u32 { |
| 11725 | 11725 | return @truncate(std.hash.Wyhash.hash( |
| 11726 | std.hash.uint32(@intFromEnum(key.tag)), | |
| 11726 | std.hash.int(@intFromEnum(key.tag)), | |
| 11727 | 11727 | std.mem.asBytes(&key.extra), |
| 11728 | 11728 | )); |
| 11729 | 11729 | } |
| ... | ... | @@ -11773,7 +11773,7 @@ fn getOrPutConstantNoExtraAssumeCapacity( |
| 11773 | 11773 | builder: *const Builder, |
| 11774 | 11774 | pub fn hash(_: @This(), key: Constant.Item) u32 { |
| 11775 | 11775 | return @truncate(std.hash.Wyhash.hash( |
| 11776 | std.hash.uint32(@intFromEnum(key.tag)), | |
| 11776 | std.hash.int(@intFromEnum(key.tag)), | |
| 11777 | 11777 | std.mem.asBytes(&key.data), |
| 11778 | 11778 | )); |
| 11779 | 11779 | } |
| ... | ... | @@ -11804,7 +11804,7 @@ fn getOrPutConstantAggregateAssumeCapacity( |
| 11804 | 11804 | const Adapter = struct { |
| 11805 | 11805 | builder: *const Builder, |
| 11806 | 11806 | pub fn hash(_: @This(), key: Key) u32 { |
| 11807 | var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); | |
| 11807 | var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); | |
| 11808 | 11808 | hasher.update(std.mem.asBytes(&key.type)); |
| 11809 | 11809 | hasher.update(std.mem.sliceAsBytes(key.vals)); |
| 11810 | 11810 | return @truncate(hasher.final()); |
| ... | ... | @@ -12421,7 +12421,7 @@ fn metadataSimpleAssumeCapacity(self: *Builder, tag: Metadata.Tag, value: anytyp |
| 12421 | 12421 | const Adapter = struct { |
| 12422 | 12422 | builder: *const Builder, |
| 12423 | 12423 | pub fn hash(_: @This(), key: Key) u32 { |
| 12424 | var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); | |
| 12424 | var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); | |
| 12425 | 12425 | inline for (std.meta.fields(@TypeOf(value))) |field| { |
| 12426 | 12426 | hasher.update(std.mem.asBytes(&@field(key.value, field.name))); |
| 12427 | 12427 | } |
| ... | ... | @@ -12457,7 +12457,7 @@ fn metadataDistinctAssumeCapacity(self: *Builder, tag: Metadata.Tag, value: anyt |
| 12457 | 12457 | const Adapter = struct { |
| 12458 | 12458 | pub fn hash(_: @This(), key: Key) u32 { |
| 12459 | 12459 | return @truncate(std.hash.Wyhash.hash( |
| 12460 | std.hash.uint32(@intFromEnum(key.tag)), | |
| 12460 | std.hash.int(@intFromEnum(key.tag)), | |
| 12461 | 12461 | std.mem.asBytes(&key.index), |
| 12462 | 12462 | )); |
| 12463 | 12463 | } |
| ... | ... | @@ -12853,7 +12853,7 @@ fn debugEnumeratorAssumeCapacity( |
| 12853 | 12853 | const Adapter = struct { |
| 12854 | 12854 | builder: *const Builder, |
| 12855 | 12855 | pub fn hash(_: @This(), key: Key) u32 { |
| 12856 | var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); | |
| 12856 | var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); | |
| 12857 | 12857 | hasher.update(std.mem.asBytes(&key.name)); |
| 12858 | 12858 | hasher.update(std.mem.asBytes(&key.bit_width)); |
| 12859 | 12859 | hasher.update(std.mem.sliceAsBytes(key.value.limbs)); |
| ... | ... | @@ -12935,7 +12935,7 @@ fn debugExpressionAssumeCapacity( |
| 12935 | 12935 | const Adapter = struct { |
| 12936 | 12936 | builder: *const Builder, |
| 12937 | 12937 | pub fn hash(_: @This(), key: Key) u32 { |
| 12938 | var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.expression))); | |
| 12938 | var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.expression))); | |
| 12939 | 12939 | hasher.update(std.mem.sliceAsBytes(key.elements)); |
| 12940 | 12940 | return @truncate(hasher.final()); |
| 12941 | 12941 | } |
| ... | ... | @@ -12981,7 +12981,7 @@ fn metadataTupleAssumeCapacity( |
| 12981 | 12981 | const Adapter = struct { |
| 12982 | 12982 | builder: *const Builder, |
| 12983 | 12983 | pub fn hash(_: @This(), key: Key) u32 { |
| 12984 | var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.tuple))); | |
| 12984 | var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.tuple))); | |
| 12985 | 12985 | hasher.update(std.mem.sliceAsBytes(key.elements)); |
| 12986 | 12986 | return @truncate(hasher.final()); |
| 12987 | 12987 | } |
| ... | ... | @@ -13029,7 +13029,7 @@ fn strTupleAssumeCapacity( |
| 13029 | 13029 | const Adapter = struct { |
| 13030 | 13030 | builder: *const Builder, |
| 13031 | 13031 | pub fn hash(_: @This(), key: Key) u32 { |
| 13032 | var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.tuple))); | |
| 13032 | var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.tuple))); | |
| 13033 | 13033 | hasher.update(std.mem.sliceAsBytes(key.elements)); |
| 13034 | 13034 | return @truncate(hasher.final()); |
| 13035 | 13035 | } |
| ... | ... | @@ -13159,7 +13159,7 @@ fn metadataConstantAssumeCapacity(self: *Builder, constant: Constant) Metadata { |
| 13159 | 13159 | const Adapter = struct { |
| 13160 | 13160 | builder: *const Builder, |
| 13161 | 13161 | pub fn hash(_: @This(), key: Constant) u32 { |
| 13162 | var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.constant))); | |
| 13162 | var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.constant))); | |
| 13163 | 13163 | hasher.update(std.mem.asBytes(&key)); |
| 13164 | 13164 | return @truncate(hasher.final()); |
| 13165 | 13165 | } |
src/InternPool.zig+4-4| ... | ... | @@ -1861,7 +1861,7 @@ pub const NullTerminatedString = enum(u32) { |
| 1861 | 1861 | |
| 1862 | 1862 | pub fn hash(ctx: @This(), a: NullTerminatedString) u32 { |
| 1863 | 1863 | _ = ctx; |
| 1864 | return std.hash.uint32(@intFromEnum(a)); | |
| 1864 | return std.hash.int(@intFromEnum(a)); | |
| 1865 | 1865 | } |
| 1866 | 1866 | }; |
| 1867 | 1867 | |
| ... | ... | @@ -4740,7 +4740,7 @@ pub const Index = enum(u32) { |
| 4740 | 4740 | |
| 4741 | 4741 | pub fn hash(ctx: @This(), a: Index) u32 { |
| 4742 | 4742 | _ = ctx; |
| 4743 | return std.hash.uint32(@intFromEnum(a)); | |
| 4743 | return std.hash.int(@intFromEnum(a)); | |
| 4744 | 4744 | } |
| 4745 | 4745 | }; |
| 4746 | 4746 | |
| ... | ... | @@ -12725,7 +12725,7 @@ const GlobalErrorSet = struct { |
| 12725 | 12725 | name: NullTerminatedString, |
| 12726 | 12726 | ) Allocator.Error!GlobalErrorSet.Index { |
| 12727 | 12727 | if (name == .empty) return .none; |
| 12728 | const hash = std.hash.uint32(@intFromEnum(name)); | |
| 12728 | const hash = std.hash.int(@intFromEnum(name)); | |
| 12729 | 12729 | var map = ges.shared.map.acquire(); |
| 12730 | 12730 | const Map = @TypeOf(map); |
| 12731 | 12731 | var map_mask = map.header().mask(); |
| ... | ... | @@ -12818,7 +12818,7 @@ const GlobalErrorSet = struct { |
| 12818 | 12818 | name: NullTerminatedString, |
| 12819 | 12819 | ) ?GlobalErrorSet.Index { |
| 12820 | 12820 | if (name == .empty) return .none; |
| 12821 | const hash = std.hash.uint32(@intFromEnum(name)); | |
| 12821 | const hash = std.hash.int(@intFromEnum(name)); | |
| 12822 | 12822 | const map = ges.shared.map.acquire(); |
| 12823 | 12823 | const map_mask = map.header().mask(); |
| 12824 | 12824 | const names_items = ges.shared.names.acquire().view().items(.@"0"); |
src/Zcu.zig+2-2| ... | ... | @@ -808,7 +808,7 @@ pub const Namespace = struct { |
| 808 | 808 | |
| 809 | 809 | pub fn hash(ctx: NavNameContext, nav: InternPool.Nav.Index) u32 { |
| 810 | 810 | const name = ctx.zcu.intern_pool.getNav(nav).name; |
| 811 | return std.hash.uint32(@intFromEnum(name)); | |
| 811 | return std.hash.int(@intFromEnum(name)); | |
| 812 | 812 | } |
| 813 | 813 | |
| 814 | 814 | pub fn eql(ctx: NavNameContext, a_nav: InternPool.Nav.Index, b_nav: InternPool.Nav.Index, b_index: usize) bool { |
| ... | ... | @@ -824,7 +824,7 @@ pub const Namespace = struct { |
| 824 | 824 | |
| 825 | 825 | pub fn hash(ctx: NameAdapter, s: InternPool.NullTerminatedString) u32 { |
| 826 | 826 | _ = ctx; |
| 827 | return std.hash.uint32(@intFromEnum(s)); | |
| 827 | return std.hash.int(@intFromEnum(s)); | |
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | pub fn eql(ctx: NameAdapter, a: InternPool.NullTerminatedString, b_nav: InternPool.Nav.Index, b_index: usize) bool { |
src/arch/wasm/CodeGen.zig+4-4| ... | ... | @@ -3974,7 +3974,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index, is_dispatch_loop: bool) Inner |
| 3974 | 3974 | var width_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; |
| 3975 | 3975 | width_bigint.sub(max_bigint, min_bigint); |
| 3976 | 3976 | width_bigint.addScalar(width_bigint.toConst(), 1); |
| 3977 | break :width width_bigint.toConst().to(u32) catch null; | |
| 3977 | break :width width_bigint.toConst().toInt(u32) catch null; | |
| 3978 | 3978 | }; |
| 3979 | 3979 | |
| 3980 | 3980 | try cg.startBlock(.block, .empty); // whole switch block start |
| ... | ... | @@ -4015,7 +4015,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index, is_dispatch_loop: bool) Inner |
| 4015 | 4015 | const val_bigint = val.toBigInt(&val_space, zcu); |
| 4016 | 4016 | var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; |
| 4017 | 4017 | index_bigint.sub(val_bigint, min_bigint); |
| 4018 | branch_list[index_bigint.toConst().to(u32) catch unreachable] = case.idx; | |
| 4018 | branch_list[index_bigint.toConst().toInt(u32) catch unreachable] = case.idx; | |
| 4019 | 4019 | } |
| 4020 | 4020 | for (case.ranges) |range| { |
| 4021 | 4021 | var low_space: Value.BigIntSpace = undefined; |
| ... | ... | @@ -4024,9 +4024,9 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index, is_dispatch_loop: bool) Inner |
| 4024 | 4024 | const high_bigint = Value.fromInterned(range[1].toInterned().?).toBigInt(&high_space, zcu); |
| 4025 | 4025 | var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; |
| 4026 | 4026 | index_bigint.sub(low_bigint, min_bigint); |
| 4027 | const start = index_bigint.toConst().to(u32) catch unreachable; | |
| 4027 | const start = index_bigint.toConst().toInt(u32) catch unreachable; | |
| 4028 | 4028 | index_bigint.sub(high_bigint, min_bigint); |
| 4029 | const end = (index_bigint.toConst().to(u32) catch unreachable) + 1; | |
| 4029 | const end = (index_bigint.toConst().toInt(u32) catch unreachable) + 1; | |
| 4030 | 4030 | @memset(branch_list[start..end], case.idx); |
| 4031 | 4031 | } |
| 4032 | 4032 | } |
src/arch/wasm/Emit.zig+1-1| ... | ... | @@ -263,7 +263,7 @@ pub fn lowerToCode(emit: *Emit) Error!void { |
| 263 | 263 | code.appendNTimesAssumeCapacity(0, 5); |
| 264 | 264 | } else { |
| 265 | 265 | const sp_global: Wasm.GlobalIndex = .stack_pointer; |
| 266 | std.leb.writeULEB128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; | |
| 266 | std.leb.writeUleb128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; | |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | inst += 1; |
src/arch/wasm/Mir.zig+2-2| ... | ... | @@ -687,7 +687,7 @@ pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayListUnmanaged(u8)) st |
| 687 | 687 | const sp_global: Wasm.GlobalIndex = .stack_pointer; |
| 688 | 688 | // load stack pointer |
| 689 | 689 | code.appendAssumeCapacity(@intFromEnum(std.wasm.Opcode.global_get)); |
| 690 | std.leb.writeULEB128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; | |
| 690 | std.leb.writeUleb128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; | |
| 691 | 691 | // store stack pointer so we can restore it when we return from the function |
| 692 | 692 | code.appendAssumeCapacity(@intFromEnum(std.wasm.Opcode.local_tee)); |
| 693 | 693 | leb.writeUleb128(code.fixedWriter(), mir.prologue.sp_local) catch unreachable; |
| ... | ... | @@ -710,7 +710,7 @@ pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayListUnmanaged(u8)) st |
| 710 | 710 | // Store the current stack pointer value into the global stack pointer so other function calls will |
| 711 | 711 | // start from this value instead and not overwrite the current stack. |
| 712 | 712 | code.appendAssumeCapacity(@intFromEnum(std.wasm.Opcode.global_set)); |
| 713 | std.leb.writeULEB128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; | |
| 713 | std.leb.writeUleb128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; | |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | var emit: Emit = .{ |
src/arch/x86_64/CodeGen.zig+4-4| ... | ... | @@ -179277,7 +179277,7 @@ fn lowerSwitchBr( |
| 179277 | 179277 | var table_len_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; |
| 179278 | 179278 | table_len_bigint.sub(max_bigint, min_bigint); |
| 179279 | 179279 | assert(table_len_bigint.positive); // min <= max |
| 179280 | break :table_len @as(u11, table_len_bigint.toConst().to(u10) catch break :table) + 1; // no more than a 1024 entry table | |
| 179280 | break :table_len @as(u11, table_len_bigint.toConst().toInt(u10) catch break :table) + 1; // no more than a 1024 entry table | |
| 179281 | 179281 | }; |
| 179282 | 179282 | assert(prong_items <= table_len); // each prong item introduces at least one unique integer to the range |
| 179283 | 179283 | if (prong_items < table_len >> 2) break :table; // no more than 75% waste |
| ... | ... | @@ -179353,7 +179353,7 @@ fn lowerSwitchBr( |
| 179353 | 179353 | const val_bigint = val.toBigInt(&val_space, zcu); |
| 179354 | 179354 | var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; |
| 179355 | 179355 | index_bigint.sub(val_bigint, min_bigint); |
| 179356 | table[index_bigint.toConst().to(u10) catch unreachable] = @intCast(cg.mir_instructions.len); | |
| 179356 | table[index_bigint.toConst().toInt(u10) catch unreachable] = @intCast(cg.mir_instructions.len); | |
| 179357 | 179357 | } |
| 179358 | 179358 | for (case.ranges) |range| { |
| 179359 | 179359 | var low_space: Value.BigIntSpace = undefined; |
| ... | ... | @@ -179362,9 +179362,9 @@ fn lowerSwitchBr( |
| 179362 | 179362 | const high_bigint = Value.fromInterned(range[1].toInterned().?).toBigInt(&high_space, zcu); |
| 179363 | 179363 | var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; |
| 179364 | 179364 | index_bigint.sub(low_bigint, min_bigint); |
| 179365 | const start = index_bigint.toConst().to(u10) catch unreachable; | |
| 179365 | const start = index_bigint.toConst().toInt(u10) catch unreachable; | |
| 179366 | 179366 | index_bigint.sub(high_bigint, min_bigint); |
| 179367 | const end = @as(u11, index_bigint.toConst().to(u10) catch unreachable) + 1; | |
| 179367 | const end = @as(u11, index_bigint.toConst().toInt(u10) catch unreachable) + 1; | |
| 179368 | 179368 | @memset(table[start..end], @intCast(cg.mir_instructions.len)); |
| 179369 | 179369 | } |
| 179370 | 179370 | } |
src/link/MachO/dyld_info/Trie.zig+8-8| ... | ... | @@ -189,9 +189,9 @@ fn finalizeNode(self: *Trie, node_index: Node.Index, offset_in_trie: u32) !Final |
| 189 | 189 | if (slice.items(.is_terminal)[node_index]) { |
| 190 | 190 | const export_flags = slice.items(.export_flags)[node_index]; |
| 191 | 191 | const vmaddr_offset = slice.items(.vmaddr_offset)[node_index]; |
| 192 | try leb.writeULEB128(writer, export_flags); | |
| 193 | try leb.writeULEB128(writer, vmaddr_offset); | |
| 194 | try leb.writeULEB128(writer, stream.bytes_written); | |
| 192 | try leb.writeUleb128(writer, export_flags); | |
| 193 | try leb.writeUleb128(writer, vmaddr_offset); | |
| 194 | try leb.writeUleb128(writer, stream.bytes_written); | |
| 195 | 195 | } else { |
| 196 | 196 | node_size += 1; // 0x0 for non-terminal nodes |
| 197 | 197 | } |
| ... | ... | @@ -201,7 +201,7 @@ fn finalizeNode(self: *Trie, node_index: Node.Index, offset_in_trie: u32) !Final |
| 201 | 201 | const edge = &self.edges.items[edge_index]; |
| 202 | 202 | const next_node_offset = slice.items(.trie_offset)[edge.node]; |
| 203 | 203 | node_size += @intCast(edge.label.len + 1); |
| 204 | try leb.writeULEB128(writer, next_node_offset); | |
| 204 | try leb.writeUleb128(writer, next_node_offset); | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | const trie_offset = slice.items(.trie_offset)[node_index]; |
| ... | ... | @@ -251,13 +251,13 @@ fn writeNode(self: *Trie, node_index: Node.Index, writer: anytype) !void { |
| 251 | 251 | // TODO Implement for special flags. |
| 252 | 252 | assert(export_flags & macho.EXPORT_SYMBOL_FLAGS_REEXPORT == 0 and |
| 253 | 253 | export_flags & macho.EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER == 0); |
| 254 | try leb.writeULEB128(info_stream.writer(), export_flags); | |
| 255 | try leb.writeULEB128(info_stream.writer(), vmaddr_offset); | |
| 254 | try leb.writeUleb128(info_stream.writer(), export_flags); | |
| 255 | try leb.writeUleb128(info_stream.writer(), vmaddr_offset); | |
| 256 | 256 | |
| 257 | 257 | // Encode the size of the terminal node info. |
| 258 | 258 | var size_buf: [@sizeOf(u64)]u8 = undefined; |
| 259 | 259 | var size_stream = std.io.fixedBufferStream(&size_buf); |
| 260 | try leb.writeULEB128(size_stream.writer(), info_stream.pos); | |
| 260 | try leb.writeUleb128(size_stream.writer(), info_stream.pos); | |
| 261 | 261 | |
| 262 | 262 | // Now, write them to the output stream. |
| 263 | 263 | try writer.writeAll(size_buf[0..size_stream.pos]); |
| ... | ... | @@ -274,7 +274,7 @@ fn writeNode(self: *Trie, node_index: Node.Index, writer: anytype) !void { |
| 274 | 274 | // Write edge label and offset to next node in trie. |
| 275 | 275 | try writer.writeAll(edge.label); |
| 276 | 276 | try writer.writeByte(0); |
| 277 | try leb.writeULEB128(writer, slice.items(.trie_offset)[edge.node]); | |
| 277 | try leb.writeUleb128(writer, slice.items(.trie_offset)[edge.node]); | |
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 |
src/link/Wasm/Flush.zig+1-1| ... | ... | @@ -146,7 +146,7 @@ pub fn finish(f: *Flush, wasm: *Wasm) !void { |
| 146 | 146 | const int_tag_ty = Zcu.Type.fromInterned(data.ip_index).intTagType(zcu); |
| 147 | 147 | gop.value_ptr.* = .{ .tag_name = .{ |
| 148 | 148 | .symbol_name = try wasm.internStringFmt("__zig_tag_name_{d}", .{@intFromEnum(data.ip_index)}), |
| 149 | .type_index = try wasm.internFunctionType(.Unspecified, &.{int_tag_ty.ip_index}, .slice_const_u8_sentinel_0, target), | |
| 149 | .type_index = try wasm.internFunctionType(.auto, &.{int_tag_ty.ip_index}, .slice_const_u8_sentinel_0, target), | |
| 150 | 150 | .table_index = @intCast(wasm.tag_name_offs.items.len), |
| 151 | 151 | } }; |
| 152 | 152 | try wasm.functions.put(gpa, .fromZcuFunc(wasm, @enumFromInt(gop.index)), {}); |
test/behavior/fn.zig+4-4| ... | ... | @@ -153,9 +153,9 @@ test "extern struct with stdcallcc fn pointer" { |
| 153 | 153 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; |
| 154 | 154 | |
| 155 | 155 | const S = extern struct { |
| 156 | ptr: *const fn () callconv(if (builtin.target.cpu.arch == .x86) .Stdcall else .c) i32, | |
| 156 | ptr: *const fn () callconv(if (builtin.target.cpu.arch == .x86) .{ .x86_stdcall = .{} } else .c) i32, | |
| 157 | 157 | |
| 158 | fn foo() callconv(if (builtin.target.cpu.arch == .x86) .Stdcall else .c) i32 { | |
| 158 | fn foo() callconv(if (builtin.target.cpu.arch == .x86) .{ .x86_stdcall = .{} } else .c) i32 { | |
| 159 | 159 | return 1234; |
| 160 | 160 | } |
| 161 | 161 | }; |
| ... | ... | @@ -170,8 +170,8 @@ fn fComplexCallconvRet(x: u32) callconv(blk: { |
| 170 | 170 | const s: struct { n: u32 } = .{ .n = nComplexCallconv }; |
| 171 | 171 | break :blk switch (s.n) { |
| 172 | 172 | 0 => .c, |
| 173 | 1 => .Inline, | |
| 174 | else => .Unspecified, | |
| 173 | 1 => .@"inline", | |
| 174 | else => .auto, | |
| 175 | 175 | }; |
| 176 | 176 | }) struct { x: u32 } { |
| 177 | 177 | return .{ .x = x * x }; |
test/behavior/type.zig+1-1| ... | ... | @@ -670,7 +670,7 @@ test "reified function type params initialized with field pointer" { |
| 670 | 670 | }; |
| 671 | 671 | const Bar = @Type(.{ |
| 672 | 672 | .@"fn" = .{ |
| 673 | .calling_convention = .Unspecified, | |
| 673 | .calling_convention = .auto, | |
| 674 | 674 | .is_generic = false, |
| 675 | 675 | .is_var_args = false, |
| 676 | 676 | .return_type = void, |
test/c_abi/main.zig+1-1| ... | ... | @@ -5763,7 +5763,7 @@ test "f128 f128 struct" { |
| 5763 | 5763 | } |
| 5764 | 5764 | |
| 5765 | 5765 | // The stdcall attribute on C functions is ignored when compiled on non-x86 |
| 5766 | const stdcall_callconv: std.builtin.CallingConvention = if (builtin.cpu.arch == .x86) .Stdcall else .C; | |
| 5766 | const stdcall_callconv: std.builtin.CallingConvention = if (builtin.cpu.arch == .x86) .{ .x86_stdcall = .{} } else .c; | |
| 5767 | 5767 | |
| 5768 | 5768 | extern fn stdcall_scalars(i8, i16, i32, f32, f64) callconv(stdcall_callconv) void; |
| 5769 | 5769 | test "Stdcall ABI scalars" { |
test/cases/compile_errors/callconv_from_global_variable.zig+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | var cc: @import("std").builtin.CallingConvention = .C; | |
| 1 | var cc: @import("std").builtin.CallingConvention = .c; | |
| 2 | 2 | export fn foo() callconv(cc) void {} |
| 3 | 3 | |
| 4 | 4 | // error |
test/cases/compile_errors/implicit_cast_of_error_set_not_a_subset.zig+1-1| ... | ... | @@ -12,5 +12,5 @@ fn foo(set1: Set1) void { |
| 12 | 12 | // backend=stage2 |
| 13 | 13 | // target=native |
| 14 | 14 | // |
| 15 | // :7:21: error: expected type 'error{C,A}', found 'error{A,B}' | |
| 15 | // :7:21: error: expected type 'error{A,C}', found 'error{A,B}' | |
| 16 | 16 | // :7:21: note: 'error.B' not a member of destination error set |
test/cases/compile_errors/reify_type.Fn_with_is_generic_true.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const Foo = @Type(.{ |
| 2 | 2 | .@"fn" = .{ |
| 3 | .calling_convention = .Unspecified, | |
| 3 | .calling_convention = .auto, | |
| 4 | 4 | .is_generic = true, |
| 5 | 5 | .is_var_args = false, |
| 6 | 6 | .return_type = u0, |
test/cases/compile_errors/reify_type.Fn_with_is_var_args_true_and_non-C_callconv.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const Foo = @Type(.{ |
| 2 | 2 | .@"fn" = .{ |
| 3 | .calling_convention = .Unspecified, | |
| 3 | .calling_convention = .auto, | |
| 4 | 4 | .is_generic = false, |
| 5 | 5 | .is_var_args = true, |
| 6 | 6 | .return_type = u0, |
test/cases/compile_errors/reify_type.Fn_with_return_type_null.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const Foo = @Type(.{ |
| 2 | 2 | .@"fn" = .{ |
| 3 | .calling_convention = .Unspecified, | |
| 3 | .calling_convention = .auto, | |
| 4 | 4 | .is_generic = false, |
| 5 | 5 | .is_var_args = false, |
| 6 | 6 | .return_type = null, |
test/src/LlvmIr.zig+14-12| ... | ... | @@ -90,19 +90,21 @@ pub fn addCase(self: *LlvmIr, case: TestCase) void { |
| 90 | 90 | |
| 91 | 91 | const obj = self.b.addObject(.{ |
| 92 | 92 | .name = "test", |
| 93 | .root_source_file = self.b.addWriteFiles().add("test.zig", case.source), | |
| 94 | .use_llvm = true, | |
| 93 | .root_module = self.b.createModule(.{ | |
| 94 | .root_source_file = self.b.addWriteFiles().add("test.zig", case.source), | |
| 95 | 95 | |
| 96 | .code_model = case.params.code_model, | |
| 97 | .error_tracing = case.params.error_tracing, | |
| 98 | .omit_frame_pointer = case.params.omit_frame_pointer, | |
| 99 | .optimize = case.params.optimize, | |
| 100 | .pic = case.params.pic, | |
| 101 | .sanitize_thread = case.params.sanitize_thread, | |
| 102 | .single_threaded = case.params.single_threaded, | |
| 103 | .strip = case.params.strip, | |
| 104 | .target = target, | |
| 105 | .unwind_tables = case.params.unwind_tables, | |
| 96 | .code_model = case.params.code_model, | |
| 97 | .error_tracing = case.params.error_tracing, | |
| 98 | .omit_frame_pointer = case.params.omit_frame_pointer, | |
| 99 | .optimize = case.params.optimize, | |
| 100 | .pic = case.params.pic, | |
| 101 | .sanitize_thread = case.params.sanitize_thread, | |
| 102 | .single_threaded = case.params.single_threaded, | |
| 103 | .strip = case.params.strip, | |
| 104 | .target = target, | |
| 105 | .unwind_tables = case.params.unwind_tables, | |
| 106 | }), | |
| 107 | .use_llvm = true, | |
| 106 | 108 | }); |
| 107 | 109 | |
| 108 | 110 | obj.dll_export_fns = case.params.dll_export_fns; |
test/standalone/c_embed_path/build.zig+4-2| ... | ... | @@ -8,8 +8,10 @@ pub fn build(b: *std.Build) void { |
| 8 | 8 | |
| 9 | 9 | const exe = b.addExecutable(.{ |
| 10 | 10 | .name = "test", |
| 11 | .target = b.graph.host, | |
| 12 | .optimize = optimize, | |
| 11 | .root_module = b.createModule(.{ | |
| 12 | .target = b.graph.host, | |
| 13 | .optimize = optimize, | |
| 14 | }), | |
| 13 | 15 | }); |
| 14 | 16 | exe.addCSourceFile(.{ |
| 15 | 17 | .file = b.path("test.c"), |
test/standalone/config_header/build.zig+1-1| ... | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | 2 | |
| 3 | 3 | pub fn build(b: *std.Build) void { |
| 4 | 4 | const config_header = b.addConfigHeader( |
| 5 | .{ .style = .{ .autoconf = b.path("config.h.in") } }, | |
| 5 | .{ .style = .{ .autoconf_undef = b.path("config.h.in") } }, | |
| 6 | 6 | .{ |
| 7 | 7 | .SOME_NO = null, |
| 8 | 8 | .SOME_TRUE = true, |
tools/docgen.zig+1-1| ... | ... | @@ -10,7 +10,7 @@ const mem = std.mem; |
| 10 | 10 | const testing = std.testing; |
| 11 | 11 | const Allocator = std.mem.Allocator; |
| 12 | 12 | const getExternalExecutor = std.zig.system.getExternalExecutor; |
| 13 | const fatal = std.zig.fatal; | |
| 13 | const fatal = std.process.fatal; | |
| 14 | 14 | |
| 15 | 15 | const max_doc_file_size = 10 * 1024 * 1024; |
| 16 | 16 |
tools/doctest.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const builtin = @import("builtin"); |
| 2 | 2 | const std = @import("std"); |
| 3 | const fatal = std.zig.fatal; | |
| 3 | const fatal = std.process.fatal; | |
| 4 | 4 | const mem = std.mem; |
| 5 | 5 | const fs = std.fs; |
| 6 | 6 | const process = std.process; |
tools/migrate_langref.zig+1-1| ... | ... | @@ -7,7 +7,7 @@ const mem = std.mem; |
| 7 | 7 | const testing = std.testing; |
| 8 | 8 | const Allocator = std.mem.Allocator; |
| 9 | 9 | const max_doc_file_size = 10 * 1024 * 1024; |
| 10 | const fatal = std.zig.fatal; | |
| 10 | const fatal = std.process.fatal; | |
| 11 | 11 | |
| 12 | 12 | pub fn main() !void { |
| 13 | 13 | var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator); |