| author | |
| committer | |
| log | 53a9ee699a35a3d245ab6d1dac1f0687a4dcb42c |
| tree | 741ec2205c1c47afbd262044f804b14a7a037fbe |
| parent | 8ccb9a6ad327a4d7fbc321b33d4aa66a27a1f5ee |
| parent | 50eb7983cde6e07d2613a6f3ab164ca055d9306f |
| signature |
close stage1 issues154 files changed, 537 insertions(+), 1235 deletions(-)
lib/std/atomic/Atomic.zig+2-2| ... | @@ -214,8 +214,8 @@ pub fn Atomic(comptime T: type) type { | ... | @@ -214,8 +214,8 @@ pub fn Atomic(comptime T: type) type { |
| 214 | inline fn bitRmw(self: *Self, comptime op: BitRmwOp, bit: Bit, comptime ordering: Ordering) u1 { | 214 | inline fn bitRmw(self: *Self, comptime op: BitRmwOp, bit: Bit, comptime ordering: Ordering) u1 { |
| 215 | // x86 supports dedicated bitwise instructions | 215 | // x86 supports dedicated bitwise instructions |
| 216 | if (comptime builtin.target.cpu.arch.isX86() and @sizeOf(T) >= 2 and @sizeOf(T) <= 8) { | 216 | if (comptime builtin.target.cpu.arch.isX86() and @sizeOf(T) >= 2 and @sizeOf(T) <= 8) { |
| 217 | // TODO: stage2 currently doesn't like the inline asm this function emits. | 217 | // TODO: this causes std lib test failures when enabled |
| 218 | if (builtin.zig_backend == .stage1) { | 218 | if (false) { |
| 219 | return x86BitRmw(self, op, bit, ordering); | 219 | return x86BitRmw(self, op, bit, ordering); |
| 220 | } | 220 | } |
| 221 | } | 221 | } |
lib/std/base64.zig+1-1| ... | @@ -9,7 +9,7 @@ pub const Error = error{ | ... | @@ -9,7 +9,7 @@ pub const Error = error{ |
| 9 | NoSpaceLeft, | 9 | NoSpaceLeft, |
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | const decoderWithIgnoreProto = std.meta.FnPtr(fn (ignore: []const u8) Base64DecoderWithIgnore); | 12 | const decoderWithIgnoreProto = *const fn (ignore: []const u8) Base64DecoderWithIgnore; |
| 13 | 13 | ||
| 14 | /// Base64 codecs | 14 | /// Base64 codecs |
| 15 | pub const Codecs = struct { | 15 | pub const Codecs = struct { |
lib/std/build.zig+2-3| ... | @@ -3293,8 +3293,7 @@ pub const LibExeObjStep = struct { | ... | @@ -3293,8 +3293,7 @@ pub const LibExeObjStep = struct { |
| 3293 | while (try it.next()) |entry| { | 3293 | while (try it.next()) |entry| { |
| 3294 | // The compiler can put these files into the same directory, but we don't | 3294 | // The compiler can put these files into the same directory, but we don't |
| 3295 | // want to copy them over. | 3295 | // want to copy them over. |
| 3296 | if (mem.eql(u8, entry.name, "stage1.id") or | 3296 | if (mem.eql(u8, entry.name, "llvm-ar.id") or |
| 3297 | mem.eql(u8, entry.name, "llvm-ar.id") or | ||
| 3298 | mem.eql(u8, entry.name, "libs.txt") or | 3297 | mem.eql(u8, entry.name, "libs.txt") or |
| 3299 | mem.eql(u8, entry.name, "builtin.zig") or | 3298 | mem.eql(u8, entry.name, "builtin.zig") or |
| 3300 | mem.eql(u8, entry.name, "zld.id") or | 3299 | mem.eql(u8, entry.name, "zld.id") or |
| ... | @@ -3607,7 +3606,7 @@ pub const Step = struct { | ... | @@ -3607,7 +3606,7 @@ pub const Step = struct { |
| 3607 | loop_flag: bool, | 3606 | loop_flag: bool, |
| 3608 | done_flag: bool, | 3607 | done_flag: bool, |
| 3609 | 3608 | ||
| 3610 | const MakeFn = std.meta.FnPtr(fn (self: *Step) anyerror!void); | 3609 | const MakeFn = *const fn (self: *Step) anyerror!void; |
| 3611 | 3610 | ||
| 3612 | pub const Id = enum { | 3611 | pub const Id = enum { |
| 3613 | top_level, | 3612 | top_level, |
lib/std/build/WriteFileStep.zig+3-3| ... | @@ -62,9 +62,9 @@ fn make(step: *Step) !void { | ... | @@ -62,9 +62,9 @@ fn make(step: *Step) !void { |
| 62 | // If, for example, a hard-coded path was used as the location to put WriteFileStep | 62 | // If, for example, a hard-coded path was used as the location to put WriteFileStep |
| 63 | // files, then two WriteFileSteps executing in parallel might clobber each other. | 63 | // files, then two WriteFileSteps executing in parallel might clobber each other. |
| 64 | 64 | ||
| 65 | // TODO port the cache system from stage1 to zig std lib. Until then we use blake2b | 65 | // TODO port the cache system from the compiler to zig std lib. Until then |
| 66 | // directly and construct the path, and no "cache hit" detection happens; the files | 66 | // we use blake2b directly and construct the path, and no "cache hit" |
| 67 | // are always written. | 67 | // detection happens; the files are always written. |
| 68 | var hash = std.crypto.hash.blake2.Blake2b384.init(.{}); | 68 | var hash = std.crypto.hash.blake2.Blake2b384.init(.{}); |
| 69 | 69 | ||
| 70 | // Random bytes to make WriteFileStep unique. Refresh this with | 70 | // Random bytes to make WriteFileStep unique. Refresh this with |
lib/std/builtin.zig+6-5| ... | @@ -698,8 +698,9 @@ pub const CompilerBackend = enum(u64) { | ... | @@ -698,8 +698,9 @@ pub const CompilerBackend = enum(u64) { |
| 698 | /// in which case this value is appropriate. Be cool and make sure your | 698 | /// in which case this value is appropriate. Be cool and make sure your |
| 699 | /// code supports `other` Zig compilers! | 699 | /// code supports `other` Zig compilers! |
| 700 | other = 0, | 700 | other = 0, |
| 701 | /// The original Zig compiler created in 2015 by Andrew Kelley. | 701 | /// The original Zig compiler created in 2015 by Andrew Kelley. Implemented |
| 702 | /// Implemented in C++. Uses LLVM. | 702 | /// in C++. Used LLVM. Deleted from the ZSF ziglang/zig codebase on |
| 703 | /// December 6th, 2022. | ||
| 703 | stage1 = 1, | 704 | stage1 = 1, |
| 704 | /// The reference implementation self-hosted compiler of Zig, using the | 705 | /// The reference implementation self-hosted compiler of Zig, using the |
| 705 | /// LLVM backend. | 706 | /// LLVM backend. |
| ... | @@ -738,7 +739,7 @@ pub const CompilerBackend = enum(u64) { | ... | @@ -738,7 +739,7 @@ pub const CompilerBackend = enum(u64) { |
| 738 | /// therefore must be kept in sync with the compiler implementation. | 739 | /// therefore must be kept in sync with the compiler implementation. |
| 739 | pub const TestFn = struct { | 740 | pub const TestFn = struct { |
| 740 | name: []const u8, | 741 | name: []const u8, |
| 741 | func: std.meta.FnPtr(fn () anyerror!void), | 742 | func: *const fn () anyerror!void, |
| 742 | async_frame_size: ?usize, | 743 | async_frame_size: ?usize, |
| 743 | }; | 744 | }; |
| 744 | 745 | ||
| ... | @@ -760,8 +761,8 @@ else | ... | @@ -760,8 +761,8 @@ else |
| 760 | pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr: ?usize) noreturn { | 761 | pub fn default_panic(msg: []const u8, error_return_trace: ?*StackTrace, ret_addr: ?usize) noreturn { |
| 761 | @setCold(true); | 762 | @setCold(true); |
| 762 | 763 | ||
| 763 | // Until self-hosted catches up with stage1 language features, we have a simpler | 764 | // For backends that cannot handle the language features depended on by the |
| 764 | // default panic function: | 765 | // default panic handler, we have a simpler panic handler: |
| 765 | if (builtin.zig_backend == .stage2_c or | 766 | if (builtin.zig_backend == .stage2_c or |
| 766 | builtin.zig_backend == .stage2_wasm or | 767 | builtin.zig_backend == .stage2_wasm or |
| 767 | builtin.zig_backend == .stage2_arm or | 768 | builtin.zig_backend == .stage2_arm or |
lib/std/c.zig+13-8| ... | @@ -241,8 +241,12 @@ pub extern "c" fn utimes(path: [*:0]const u8, times: *[2]c.timeval) c_int; | ... | @@ -241,8 +241,12 @@ pub extern "c" fn utimes(path: [*:0]const u8, times: *[2]c.timeval) c_int; |
| 241 | pub extern "c" fn utimensat(dirfd: c.fd_t, pathname: [*:0]const u8, times: *[2]c.timespec, flags: u32) c_int; | 241 | pub extern "c" fn utimensat(dirfd: c.fd_t, pathname: [*:0]const u8, times: *[2]c.timespec, flags: u32) c_int; |
| 242 | pub extern "c" fn futimens(fd: c.fd_t, times: *const [2]c.timespec) c_int; | 242 | pub extern "c" fn futimens(fd: c.fd_t, times: *const [2]c.timespec) c_int; |
| 243 | 243 | ||
| 244 | const PThreadStartFn = std.meta.FnPtr(fn (?*anyopaque) callconv(.C) ?*anyopaque); | 244 | pub extern "c" fn pthread_create( |
| 245 | pub extern "c" fn pthread_create(noalias newthread: *pthread_t, noalias attr: ?*const c.pthread_attr_t, start_routine: PThreadStartFn, noalias arg: ?*anyopaque) c.E; | 245 | noalias newthread: *pthread_t, |
| 246 | noalias attr: ?*const c.pthread_attr_t, | ||
| 247 | start_routine: *const fn (?*anyopaque) callconv(.C) ?*anyopaque, | ||
| 248 | noalias arg: ?*anyopaque, | ||
| 249 | ) c.E; | ||
| 246 | pub extern "c" fn pthread_attr_init(attr: *c.pthread_attr_t) c.E; | 250 | pub extern "c" fn pthread_attr_init(attr: *c.pthread_attr_t) c.E; |
| 247 | pub extern "c" fn pthread_attr_setstack(attr: *c.pthread_attr_t, stackaddr: *anyopaque, stacksize: usize) c.E; | 251 | pub extern "c" fn pthread_attr_setstack(attr: *c.pthread_attr_t, stackaddr: *anyopaque, stacksize: usize) c.E; |
| 248 | pub extern "c" fn pthread_attr_setstacksize(attr: *c.pthread_attr_t, stacksize: usize) c.E; | 252 | pub extern "c" fn pthread_attr_setstacksize(attr: *c.pthread_attr_t, stacksize: usize) c.E; |
| ... | @@ -251,14 +255,15 @@ pub extern "c" fn pthread_attr_destroy(attr: *c.pthread_attr_t) c.E; | ... | @@ -251,14 +255,15 @@ pub extern "c" fn pthread_attr_destroy(attr: *c.pthread_attr_t) c.E; |
| 251 | pub extern "c" fn pthread_self() pthread_t; | 255 | pub extern "c" fn pthread_self() pthread_t; |
| 252 | pub extern "c" fn pthread_join(thread: pthread_t, arg_return: ?*?*anyopaque) c.E; | 256 | pub extern "c" fn pthread_join(thread: pthread_t, arg_return: ?*?*anyopaque) c.E; |
| 253 | pub extern "c" fn pthread_detach(thread: pthread_t) c.E; | 257 | pub extern "c" fn pthread_detach(thread: pthread_t) c.E; |
| 254 | const PThreadForkFn = std.meta.FnPtr(fn () callconv(.C) void); | ||
| 255 | pub extern "c" fn pthread_atfork( | 258 | pub extern "c" fn pthread_atfork( |
| 256 | prepare: ?PThreadForkFn, | 259 | prepare: ?*const fn () callconv(.C) void, |
| 257 | parent: ?PThreadForkFn, | 260 | parent: ?*const fn () callconv(.C) void, |
| 258 | child: ?PThreadForkFn, | 261 | child: ?*const fn () callconv(.C) void, |
| 259 | ) c_int; | 262 | ) c_int; |
| 260 | const PThreadKeyCreateFn = std.meta.FnPtr(fn (value: *anyopaque) callconv(.C) void); | 263 | pub extern "c" fn pthread_key_create( |
| 261 | pub extern "c" fn pthread_key_create(key: *c.pthread_key_t, destructor: ?PThreadKeyCreateFn) c.E; | 264 | key: *c.pthread_key_t, |
| 265 | destructor: ?*const fn (value: *anyopaque) callconv(.C) void, | ||
| 266 | ) c.E; | ||
| 262 | pub extern "c" fn pthread_key_delete(key: c.pthread_key_t) c.E; | 267 | pub extern "c" fn pthread_key_delete(key: c.pthread_key_t) c.E; |
| 263 | pub extern "c" fn pthread_getspecific(key: c.pthread_key_t) ?*anyopaque; | 268 | pub extern "c" fn pthread_getspecific(key: c.pthread_key_t) ?*anyopaque; |
| 264 | pub extern "c" fn pthread_setspecific(key: c.pthread_key_t, value: ?*anyopaque) c_int; | 269 | pub extern "c" fn pthread_setspecific(key: c.pthread_key_t, value: ?*anyopaque) c_int; |
lib/std/c/darwin.zig+2-2| ... | @@ -918,8 +918,8 @@ pub const siginfo_t = extern struct { | ... | @@ -918,8 +918,8 @@ pub const siginfo_t = extern struct { |
| 918 | 918 | ||
| 919 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. | 919 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. |
| 920 | pub const Sigaction = extern struct { | 920 | pub const Sigaction = extern struct { |
| 921 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 921 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 922 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 922 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 923 | 923 | ||
| 924 | handler: extern union { | 924 | handler: extern union { |
| 925 | handler: ?handler_fn, | 925 | handler: ?handler_fn, |
lib/std/c/dragonfly.zig+3-3| ... | @@ -13,7 +13,7 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; | ... | @@ -13,7 +13,7 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; |
| 13 | pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; | 13 | pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; |
| 14 | pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int; | 14 | pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int; |
| 15 | 15 | ||
| 16 | pub const dl_iterate_phdr_callback = std.meta.FnPtr(fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int); | 16 | pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; |
| 17 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 17 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 18 | 18 | ||
| 19 | pub extern "c" fn lwp_gettid() c_int; | 19 | pub extern "c" fn lwp_gettid() c_int; |
| ... | @@ -681,8 +681,8 @@ pub const empty_sigset = sigset_t{ .__bits = [_]c_uint{0} ** _SIG_WORDS }; | ... | @@ -681,8 +681,8 @@ pub const empty_sigset = sigset_t{ .__bits = [_]c_uint{0} ** _SIG_WORDS }; |
| 681 | pub const sig_atomic_t = c_int; | 681 | pub const sig_atomic_t = c_int; |
| 682 | 682 | ||
| 683 | pub const Sigaction = extern struct { | 683 | pub const Sigaction = extern struct { |
| 684 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 684 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 685 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 685 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 686 | 686 | ||
| 687 | /// signal handler | 687 | /// signal handler |
| 688 | handler: extern union { | 688 | handler: extern union { |
lib/std/c/freebsd.zig+3-3| ... | @@ -37,7 +37,7 @@ pub extern "c" fn sendfile( | ... | @@ -37,7 +37,7 @@ pub extern "c" fn sendfile( |
| 37 | flags: u32, | 37 | flags: u32, |
| 38 | ) c_int; | 38 | ) c_int; |
| 39 | 39 | ||
| 40 | pub const dl_iterate_phdr_callback = std.meta.FnPtr(fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int); | 40 | pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; |
| 41 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 41 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 42 | 42 | ||
| 43 | pub const pthread_mutex_t = extern struct { | 43 | pub const pthread_mutex_t = extern struct { |
| ... | @@ -1197,8 +1197,8 @@ const NSIG = 32; | ... | @@ -1197,8 +1197,8 @@ const NSIG = 32; |
| 1197 | 1197 | ||
| 1198 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 1198 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 1199 | pub const Sigaction = extern struct { | 1199 | pub const Sigaction = extern struct { |
| 1200 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 1200 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 1201 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 1201 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 1202 | 1202 | ||
| 1203 | /// signal handler | 1203 | /// signal handler |
| 1204 | handler: extern union { | 1204 | handler: extern union { |
lib/std/c/haiku.zig+1-1| ... | @@ -742,7 +742,7 @@ const NSIG = 32; | ... | @@ -742,7 +742,7 @@ const NSIG = 32; |
| 742 | 742 | ||
| 743 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 743 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 744 | pub const Sigaction = extern struct { | 744 | pub const Sigaction = extern struct { |
| 745 | pub const handler_fn = std.meta.FnPtr(fn (i32) align(1) callconv(.C) void); | 745 | pub const handler_fn = *const fn (i32) align(1) callconv(.C) void; |
| 746 | 746 | ||
| 747 | /// signal handler | 747 | /// signal handler |
| 748 | __sigaction_u: extern union { | 748 | __sigaction_u: extern union { |
lib/std/c/linux.zig+1-1| ... | @@ -263,7 +263,7 @@ pub extern "c" fn inotify_rm_watch(fd: fd_t, wd: c_int) c_int; | ... | @@ -263,7 +263,7 @@ pub extern "c" fn inotify_rm_watch(fd: fd_t, wd: c_int) c_int; |
| 263 | /// See std.elf for constants for this | 263 | /// See std.elf for constants for this |
| 264 | pub extern "c" fn getauxval(__type: c_ulong) c_ulong; | 264 | pub extern "c" fn getauxval(__type: c_ulong) c_ulong; |
| 265 | 265 | ||
| 266 | pub const dl_iterate_phdr_callback = std.meta.FnPtr(fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int); | 266 | pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; |
| 267 | 267 | ||
| 268 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 268 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 269 | 269 |
lib/std/c/netbsd.zig+3-3| ... | @@ -9,7 +9,7 @@ const rusage = std.c.rusage; | ... | @@ -9,7 +9,7 @@ const rusage = std.c.rusage; |
| 9 | extern "c" fn __errno() *c_int; | 9 | extern "c" fn __errno() *c_int; |
| 10 | pub const _errno = __errno; | 10 | pub const _errno = __errno; |
| 11 | 11 | ||
| 12 | pub const dl_iterate_phdr_callback = std.meta.FnPtr(fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int); | 12 | pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; |
| 13 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 13 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 14 | 14 | ||
| 15 | pub extern "c" fn _lwp_self() lwpid_t; | 15 | pub extern "c" fn _lwp_self() lwpid_t; |
| ... | @@ -971,8 +971,8 @@ pub const SIG = struct { | ... | @@ -971,8 +971,8 @@ pub const SIG = struct { |
| 971 | 971 | ||
| 972 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 972 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 973 | pub const Sigaction = extern struct { | 973 | pub const Sigaction = extern struct { |
| 974 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 974 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 975 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 975 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 976 | 976 | ||
| 977 | /// signal handler | 977 | /// signal handler |
| 978 | handler: extern union { | 978 | handler: extern union { |
lib/std/c/openbsd.zig+3-3| ... | @@ -7,7 +7,7 @@ const iovec_const = std.os.iovec_const; | ... | @@ -7,7 +7,7 @@ const iovec_const = std.os.iovec_const; |
| 7 | extern "c" fn __errno() *c_int; | 7 | extern "c" fn __errno() *c_int; |
| 8 | pub const _errno = __errno; | 8 | pub const _errno = __errno; |
| 9 | 9 | ||
| 10 | pub const dl_iterate_phdr_callback = std.meta.FnPtr(fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int); | 10 | pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; |
| 11 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 11 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 12 | 12 | ||
| 13 | pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void; | 13 | pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void; |
| ... | @@ -1026,8 +1026,8 @@ pub const SIG = struct { | ... | @@ -1026,8 +1026,8 @@ pub const SIG = struct { |
| 1026 | 1026 | ||
| 1027 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 1027 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 1028 | pub const Sigaction = extern struct { | 1028 | pub const Sigaction = extern struct { |
| 1029 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 1029 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 1030 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 1030 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 1031 | 1031 | ||
| 1032 | /// signal handler | 1032 | /// signal handler |
| 1033 | handler: extern union { | 1033 | handler: extern union { |
lib/std/c/solaris.zig+3-3| ... | @@ -8,7 +8,7 @@ const timezone = std.c.timezone; | ... | @@ -8,7 +8,7 @@ const timezone = std.c.timezone; |
| 8 | extern "c" fn ___errno() *c_int; | 8 | extern "c" fn ___errno() *c_int; |
| 9 | pub const _errno = ___errno; | 9 | pub const _errno = ___errno; |
| 10 | 10 | ||
| 11 | pub const dl_iterate_phdr_callback = std.meta.FnPtr(fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int); | 11 | pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; |
| 12 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 12 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 13 | 13 | ||
| 14 | pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize; | 14 | pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize; |
| ... | @@ -952,8 +952,8 @@ pub const SIG = struct { | ... | @@ -952,8 +952,8 @@ pub const SIG = struct { |
| 952 | 952 | ||
| 953 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 953 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 954 | pub const Sigaction = extern struct { | 954 | pub const Sigaction = extern struct { |
| 955 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 955 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 956 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 956 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 957 | 957 | ||
| 958 | /// signal options | 958 | /// signal options |
| 959 | flags: c_uint, | 959 | flags: c_uint, |
lib/std/compress/deflate/compressor.zig+1-1| ... | @@ -254,7 +254,7 @@ pub fn Compressor(comptime WriterType: anytype) type { | ... | @@ -254,7 +254,7 @@ pub fn Compressor(comptime WriterType: anytype) type { |
| 254 | 254 | ||
| 255 | // Inner writer wrapped in a HuffmanBitWriter | 255 | // Inner writer wrapped in a HuffmanBitWriter |
| 256 | hm_bw: hm_bw.HuffmanBitWriter(WriterType) = undefined, | 256 | hm_bw: hm_bw.HuffmanBitWriter(WriterType) = undefined, |
| 257 | bulk_hasher: std.meta.FnPtr(fn ([]u8, []u32) u32), | 257 | bulk_hasher: *const fn ([]u8, []u32) u32, |
| 258 | 258 | ||
| 259 | sync: bool, // requesting flush | 259 | sync: bool, // requesting flush |
| 260 | best_speed_enc: *fast.DeflateFast, // Encoder for best_speed | 260 | best_speed_enc: *fast.DeflateFast, // Encoder for best_speed |
lib/std/compress/deflate/compressor_test.zig+2-1| ... | @@ -133,7 +133,8 @@ fn testToFromWithLevelAndLimit(level: deflate.Compression, input: []const u8, li | ... | @@ -133,7 +133,8 @@ fn testToFromWithLevelAndLimit(level: deflate.Compression, input: []const u8, li |
| 133 | try expect(read == input.len); | 133 | try expect(read == input.len); |
| 134 | try expect(mem.eql(u8, input, decompressed)); | 134 | try expect(mem.eql(u8, input, decompressed)); |
| 135 | 135 | ||
| 136 | if (builtin.zig_backend == .stage1) { | 136 | if (false) { |
| 137 | // TODO: this test has regressed | ||
| 137 | try testSync(level, input); | 138 | try testSync(level, input); |
| 138 | } | 139 | } |
| 139 | } | 140 | } |
lib/std/compress/deflate/decompressor.zig+1-7| ... | @@ -334,7 +334,7 @@ pub fn Decompressor(comptime ReaderType: type) type { | ... | @@ -334,7 +334,7 @@ pub fn Decompressor(comptime ReaderType: type) type { |
| 334 | 334 | ||
| 335 | // Next step in the decompression, | 335 | // Next step in the decompression, |
| 336 | // and decompression state. | 336 | // and decompression state. |
| 337 | step: std.meta.FnPtr(fn (*Self) Error!void), | 337 | step: *const fn (*Self) Error!void, |
| 338 | step_state: DecompressorState, | 338 | step_state: DecompressorState, |
| 339 | final: bool, | 339 | final: bool, |
| 340 | err: ?Error, | 340 | err: ?Error, |
| ... | @@ -479,12 +479,6 @@ pub fn Decompressor(comptime ReaderType: type) type { | ... | @@ -479,12 +479,6 @@ pub fn Decompressor(comptime ReaderType: type) type { |
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | pub fn close(self: *Self) ?Error { | 481 | pub fn close(self: *Self) ?Error { |
| 482 | if (@import("builtin").zig_backend == .stage1) { | ||
| 483 | if (self.err == Error.EndOfStreamWithNoError) { | ||
| 484 | return null; | ||
| 485 | } | ||
| 486 | return self.err; | ||
| 487 | } | ||
| 488 | if (self.err == @as(?Error, error.EndOfStreamWithNoError)) { | 482 | if (self.err == @as(?Error, error.EndOfStreamWithNoError)) { |
| 489 | return null; | 483 | return null; |
| 490 | } | 484 | } |
lib/std/dwarf.zig+1-1| ... | @@ -638,7 +638,7 @@ fn parseFormValue(allocator: mem.Allocator, in_stream: anytype, form_id: u64, en | ... | @@ -638,7 +638,7 @@ fn parseFormValue(allocator: mem.Allocator, in_stream: anytype, form_id: u64, en |
| 638 | FORM.line_strp => FormValue{ .LineStrPtr = try readAddress(in_stream, endian, is_64) }, | 638 | FORM.line_strp => FormValue{ .LineStrPtr = try readAddress(in_stream, endian, is_64) }, |
| 639 | FORM.indirect => { | 639 | FORM.indirect => { |
| 640 | const child_form_id = try nosuspend leb.readULEB128(u64, in_stream); | 640 | const child_form_id = try nosuspend leb.readULEB128(u64, in_stream); |
| 641 | if (builtin.zig_backend != .stage1) { | 641 | if (true) { |
| 642 | return parseFormValue(allocator, in_stream, child_form_id, endian, is_64); | 642 | return parseFormValue(allocator, in_stream, child_form_id, endian, is_64); |
| 643 | } | 643 | } |
| 644 | const F = @TypeOf(async parseFormValue(allocator, in_stream, child_form_id, endian, is_64)); | 644 | const F = @TypeOf(async parseFormValue(allocator, in_stream, child_form_id, endian, is_64)); |
lib/std/event/batch.zig+1-1| ... | @@ -109,7 +109,7 @@ pub fn Batch( | ... | @@ -109,7 +109,7 @@ pub fn Batch( |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | test "std.event.Batch" { | 111 | test "std.event.Batch" { |
| 112 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; | 112 | if (true) return error.SkipZigTest; |
| 113 | var count: usize = 0; | 113 | var count: usize = 0; |
| 114 | var batch = Batch(void, 2, .auto_async).init(); | 114 | var batch = Batch(void, 2, .auto_async).init(); |
| 115 | batch.add(&async sleepALittle(&count)); | 115 | batch.add(&async sleepALittle(&count)); |
lib/std/event/loop.zig+1-1| ... | @@ -1469,7 +1469,7 @@ pub const Loop = struct { | ... | @@ -1469,7 +1469,7 @@ pub const Loop = struct { |
| 1469 | .Cancelled => continue, | 1469 | .Cancelled => continue, |
| 1470 | } | 1470 | } |
| 1471 | if (overlapped) |o| break o; | 1471 | if (overlapped) |o| break o; |
| 1472 | } else unreachable; // TODO else unreachable should not be necessary | 1472 | }; |
| 1473 | const resume_node = @fieldParentPtr(ResumeNode, "overlapped", overlapped); | 1473 | const resume_node = @fieldParentPtr(ResumeNode, "overlapped", overlapped); |
| 1474 | const handle = resume_node.handle; | 1474 | const handle = resume_node.handle; |
| 1475 | const resume_node_id = resume_node.id; | 1475 | const resume_node_id = resume_node.id; |
lib/std/fmt.zig+1-39| ... | @@ -2209,7 +2209,7 @@ test "pointer" { | ... | @@ -2209,7 +2209,7 @@ test "pointer" { |
| 2209 | try expectFmt("pointer: i32@deadbeef\n", "pointer: {}\n", .{value}); | 2209 | try expectFmt("pointer: i32@deadbeef\n", "pointer: {}\n", .{value}); |
| 2210 | try expectFmt("pointer: i32@deadbeef\n", "pointer: {*}\n", .{value}); | 2210 | try expectFmt("pointer: i32@deadbeef\n", "pointer: {*}\n", .{value}); |
| 2211 | } | 2211 | } |
| 2212 | const FnPtr = if (builtin.zig_backend == .stage1) fn () void else *align(1) const fn () void; | 2212 | const FnPtr = *align(1) const fn () void; |
| 2213 | { | 2213 | { |
| 2214 | const value = @intToPtr(FnPtr, 0xdeadbeef); | 2214 | const value = @intToPtr(FnPtr, 0xdeadbeef); |
| 2215 | try expectFmt("pointer: fn() void@deadbeef\n", "pointer: {}\n", .{value}); | 2215 | try expectFmt("pointer: fn() void@deadbeef\n", "pointer: {}\n", .{value}); |
| ... | @@ -2266,10 +2266,6 @@ test "struct" { | ... | @@ -2266,10 +2266,6 @@ test "struct" { |
| 2266 | } | 2266 | } |
| 2267 | 2267 | ||
| 2268 | test "enum" { | 2268 | test "enum" { |
| 2269 | if (builtin.zig_backend == .stage1) { | ||
| 2270 | // stage1 starts the typename with 'std' which might also be desireable for stage2 | ||
| 2271 | return error.SkipZigTest; | ||
| 2272 | } | ||
| 2273 | const Enum = enum { | 2269 | const Enum = enum { |
| 2274 | One, | 2270 | One, |
| 2275 | Two, | 2271 | Two, |
| ... | @@ -2285,10 +2281,6 @@ test "enum" { | ... | @@ -2285,10 +2281,6 @@ test "enum" { |
| 2285 | } | 2281 | } |
| 2286 | 2282 | ||
| 2287 | test "non-exhaustive enum" { | 2283 | test "non-exhaustive enum" { |
| 2288 | if (builtin.zig_backend == .stage1) { | ||
| 2289 | // stage1 fails to return fully qualified namespaces. | ||
| 2290 | return error.SkipZigTest; | ||
| 2291 | } | ||
| 2292 | const Enum = enum(u16) { | 2284 | const Enum = enum(u16) { |
| 2293 | One = 0x000f, | 2285 | One = 0x000f, |
| 2294 | Two = 0xbeef, | 2286 | Two = 0xbeef, |
| ... | @@ -2462,10 +2454,6 @@ test "custom" { | ... | @@ -2462,10 +2454,6 @@ test "custom" { |
| 2462 | } | 2454 | } |
| 2463 | 2455 | ||
| 2464 | test "struct" { | 2456 | test "struct" { |
| 2465 | if (builtin.zig_backend == .stage1) { | ||
| 2466 | // stage1 fails to return fully qualified namespaces. | ||
| 2467 | return error.SkipZigTest; | ||
| 2468 | } | ||
| 2469 | const S = struct { | 2457 | const S = struct { |
| 2470 | a: u32, | 2458 | a: u32, |
| 2471 | b: anyerror, | 2459 | b: anyerror, |
| ... | @@ -2484,10 +2472,6 @@ test "struct" { | ... | @@ -2484,10 +2472,6 @@ test "struct" { |
| 2484 | } | 2472 | } |
| 2485 | 2473 | ||
| 2486 | test "union" { | 2474 | test "union" { |
| 2487 | if (builtin.zig_backend == .stage1) { | ||
| 2488 | // stage1 fails to return fully qualified namespaces. | ||
| 2489 | return error.SkipZigTest; | ||
| 2490 | } | ||
| 2491 | const TU = union(enum) { | 2475 | const TU = union(enum) { |
| 2492 | float: f32, | 2476 | float: f32, |
| 2493 | int: u32, | 2477 | int: u32, |
| ... | @@ -2518,10 +2502,6 @@ test "union" { | ... | @@ -2518,10 +2502,6 @@ test "union" { |
| 2518 | } | 2502 | } |
| 2519 | 2503 | ||
| 2520 | test "enum" { | 2504 | test "enum" { |
| 2521 | if (builtin.zig_backend == .stage1) { | ||
| 2522 | // stage1 fails to return fully qualified namespaces. | ||
| 2523 | return error.SkipZigTest; | ||
| 2524 | } | ||
| 2525 | const E = enum { | 2505 | const E = enum { |
| 2526 | One, | 2506 | One, |
| 2527 | Two, | 2507 | Two, |
| ... | @@ -2534,10 +2514,6 @@ test "enum" { | ... | @@ -2534,10 +2514,6 @@ test "enum" { |
| 2534 | } | 2514 | } |
| 2535 | 2515 | ||
| 2536 | test "struct.self-referential" { | 2516 | test "struct.self-referential" { |
| 2537 | if (builtin.zig_backend == .stage1) { | ||
| 2538 | // stage1 fails to return fully qualified namespaces. | ||
| 2539 | return error.SkipZigTest; | ||
| 2540 | } | ||
| 2541 | const S = struct { | 2517 | const S = struct { |
| 2542 | const SelfType = @This(); | 2518 | const SelfType = @This(); |
| 2543 | a: ?*SelfType, | 2519 | a: ?*SelfType, |
| ... | @@ -2552,10 +2528,6 @@ test "struct.self-referential" { | ... | @@ -2552,10 +2528,6 @@ test "struct.self-referential" { |
| 2552 | } | 2528 | } |
| 2553 | 2529 | ||
| 2554 | test "struct.zero-size" { | 2530 | test "struct.zero-size" { |
| 2555 | if (builtin.zig_backend == .stage1) { | ||
| 2556 | // stage1 fails to return fully qualified namespaces. | ||
| 2557 | return error.SkipZigTest; | ||
| 2558 | } | ||
| 2559 | const A = struct { | 2531 | const A = struct { |
| 2560 | fn foo() void {} | 2532 | fn foo() void {} |
| 2561 | }; | 2533 | }; |
| ... | @@ -2633,10 +2605,6 @@ test "formatFloatValue with comptime_float" { | ... | @@ -2633,10 +2605,6 @@ test "formatFloatValue with comptime_float" { |
| 2633 | } | 2605 | } |
| 2634 | 2606 | ||
| 2635 | test "formatType max_depth" { | 2607 | test "formatType max_depth" { |
| 2636 | if (builtin.zig_backend == .stage1) { | ||
| 2637 | // stage1 fails to return fully qualified namespaces. | ||
| 2638 | return error.SkipZigTest; | ||
| 2639 | } | ||
| 2640 | const Vec2 = struct { | 2608 | const Vec2 = struct { |
| 2641 | const SelfType = @This(); | 2609 | const SelfType = @This(); |
| 2642 | x: f32, | 2610 | x: f32, |
| ... | @@ -2724,12 +2692,6 @@ test "vector" { | ... | @@ -2724,12 +2692,6 @@ test "vector" { |
| 2724 | return error.SkipZigTest; | 2692 | return error.SkipZigTest; |
| 2725 | } | 2693 | } |
| 2726 | 2694 | ||
| 2727 | if (builtin.zig_backend == .stage1) { | ||
| 2728 | // Regressed in LLVM 14: | ||
| 2729 | // https://github.com/llvm/llvm-project/issues/55522 | ||
| 2730 | return error.SkipZigTest; | ||
| 2731 | } | ||
| 2732 | |||
| 2733 | const vbool: @Vector(4, bool) = [_]bool{ true, false, true, false }; | 2695 | const vbool: @Vector(4, bool) = [_]bool{ true, false, true, false }; |
| 2734 | const vi64: @Vector(4, i64) = [_]i64{ -2, -1, 0, 1 }; | 2696 | const vi64: @Vector(4, i64) = [_]i64{ -2, -1, 0, 1 }; |
| 2735 | const vu64: @Vector(4, u64) = [_]u64{ 1000, 2000, 3000, 4000 }; | 2697 | const vu64: @Vector(4, u64) = [_]u64{ 1000, 2000, 3000, 4000 }; |
lib/std/fmt/parse_float.zig+1-3| ... | @@ -70,9 +70,7 @@ test "fmt.parseFloat" { | ... | @@ -70,9 +70,7 @@ test "fmt.parseFloat" { |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | test "fmt.parseFloat nan and inf" { | 72 | test "fmt.parseFloat nan and inf" { |
| 73 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 73 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 74 | builtin.cpu.arch == .aarch64) | ||
| 75 | { | ||
| 76 | // https://github.com/ziglang/zig/issues/12027 | 74 | // https://github.com/ziglang/zig/issues/12027 |
| 77 | return error.SkipZigTest; | 75 | return error.SkipZigTest; |
| 78 | } | 76 | } |
lib/std/json.zig+1-4| ... | @@ -2373,10 +2373,7 @@ pub fn stringifyAlloc(allocator: std.mem.Allocator, value: anytype, options: Str | ... | @@ -2373,10 +2373,7 @@ pub fn stringifyAlloc(allocator: std.mem.Allocator, value: anytype, options: Str |
| 2373 | } | 2373 | } |
| 2374 | 2374 | ||
| 2375 | test { | 2375 | test { |
| 2376 | if (builtin.zig_backend != .stage1) { | 2376 | _ = @import("json/test.zig"); |
| 2377 | // https://github.com/ziglang/zig/issues/8442 | ||
| 2378 | _ = @import("json/test.zig"); | ||
| 2379 | } | ||
| 2380 | _ = @import("json/write_stream.zig"); | 2377 | _ = @import("json/write_stream.zig"); |
| 2381 | } | 2378 | } |
| 2382 | 2379 |
lib/std/leb128.zig+2-6| ... | @@ -347,9 +347,7 @@ fn test_write_leb128(value: anytype) !void { | ... | @@ -347,9 +347,7 @@ fn test_write_leb128(value: anytype) !void { |
| 347 | } | 347 | } |
| 348 | 348 | ||
| 349 | test "serialize unsigned LEB128" { | 349 | test "serialize unsigned LEB128" { |
| 350 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 350 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .riscv64) { |
| 351 | builtin.cpu.arch == .riscv64) | ||
| 352 | { | ||
| 353 | // https://github.com/ziglang/zig/issues/12031 | 351 | // https://github.com/ziglang/zig/issues/12031 |
| 354 | return error.SkipZigTest; | 352 | return error.SkipZigTest; |
| 355 | } | 353 | } |
| ... | @@ -368,9 +366,7 @@ test "serialize unsigned LEB128" { | ... | @@ -368,9 +366,7 @@ test "serialize unsigned LEB128" { |
| 368 | } | 366 | } |
| 369 | 367 | ||
| 370 | test "serialize signed LEB128" { | 368 | test "serialize signed LEB128" { |
| 371 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 369 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .riscv64) { |
| 372 | builtin.cpu.arch == .riscv64) | ||
| 373 | { | ||
| 374 | // https://github.com/ziglang/zig/issues/12031 | 370 | // https://github.com/ziglang/zig/issues/12031 |
| 375 | return error.SkipZigTest; | 371 | return error.SkipZigTest; |
| 376 | } | 372 | } |
lib/std/math.zig+5-13| ... | @@ -528,9 +528,7 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { | ... | @@ -528,9 +528,7 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | test "shl" { | 530 | test "shl" { |
| 531 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 531 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 532 | builtin.cpu.arch == .aarch64) | ||
| 533 | { | ||
| 534 | // https://github.com/ziglang/zig/issues/12012 | 532 | // https://github.com/ziglang/zig/issues/12012 |
| 535 | return error.SkipZigTest; | 533 | return error.SkipZigTest; |
| 536 | } | 534 | } |
| ... | @@ -574,9 +572,7 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { | ... | @@ -574,9 +572,7 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { |
| 574 | } | 572 | } |
| 575 | 573 | ||
| 576 | test "shr" { | 574 | test "shr" { |
| 577 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 575 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 578 | builtin.cpu.arch == .aarch64) | ||
| 579 | { | ||
| 580 | // https://github.com/ziglang/zig/issues/12012 | 576 | // https://github.com/ziglang/zig/issues/12012 |
| 581 | return error.SkipZigTest; | 577 | return error.SkipZigTest; |
| 582 | } | 578 | } |
| ... | @@ -621,9 +617,7 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { | ... | @@ -621,9 +617,7 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { |
| 621 | } | 617 | } |
| 622 | 618 | ||
| 623 | test "rotr" { | 619 | test "rotr" { |
| 624 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 620 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 625 | builtin.cpu.arch == .aarch64) | ||
| 626 | { | ||
| 627 | // https://github.com/ziglang/zig/issues/12012 | 621 | // https://github.com/ziglang/zig/issues/12012 |
| 628 | return error.SkipZigTest; | 622 | return error.SkipZigTest; |
| 629 | } | 623 | } |
| ... | @@ -667,9 +661,7 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { | ... | @@ -667,9 +661,7 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { |
| 667 | } | 661 | } |
| 668 | 662 | ||
| 669 | test "rotl" { | 663 | test "rotl" { |
| 670 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 664 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 671 | builtin.cpu.arch == .aarch64) | ||
| 672 | { | ||
| 673 | // https://github.com/ziglang/zig/issues/12012 | 665 | // https://github.com/ziglang/zig/issues/12012 |
| 674 | return error.SkipZigTest; | 666 | return error.SkipZigTest; |
| 675 | } | 667 | } |
| ... | @@ -1695,7 +1687,7 @@ fn testSign() !void { | ... | @@ -1695,7 +1687,7 @@ fn testSign() !void { |
| 1695 | } | 1687 | } |
| 1696 | 1688 | ||
| 1697 | test "sign" { | 1689 | test "sign" { |
| 1698 | if (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) { | 1690 | if (builtin.zig_backend == .stage2_llvm) { |
| 1699 | // https://github.com/ziglang/zig/issues/12012 | 1691 | // https://github.com/ziglang/zig/issues/12012 |
| 1700 | return error.SkipZigTest; | 1692 | return error.SkipZigTest; |
| 1701 | } | 1693 | } |
lib/std/mem.zig+1-7| ... | @@ -322,7 +322,7 @@ pub fn zeroes(comptime T: type) T { | ... | @@ -322,7 +322,7 @@ pub fn zeroes(comptime T: type) T { |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | test "zeroes" { | 324 | test "zeroes" { |
| 325 | if (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) { | 325 | if (builtin.zig_backend == .stage2_llvm) { |
| 326 | // Regressed in LLVM 14: | 326 | // Regressed in LLVM 14: |
| 327 | // https://github.com/llvm/llvm-project/issues/55522 | 327 | // https://github.com/llvm/llvm-project/issues/55522 |
| 328 | return error.SkipZigTest; | 328 | return error.SkipZigTest; |
| ... | @@ -3187,8 +3187,6 @@ pub fn asBytes(ptr: anytype) AsBytesReturnType(@TypeOf(ptr)) { | ... | @@ -3187,8 +3187,6 @@ pub fn asBytes(ptr: anytype) AsBytesReturnType(@TypeOf(ptr)) { |
| 3187 | } | 3187 | } |
| 3188 | 3188 | ||
| 3189 | test "asBytes" { | 3189 | test "asBytes" { |
| 3190 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 3191 | |||
| 3192 | const deadbeef = @as(u32, 0xDEADBEEF); | 3190 | const deadbeef = @as(u32, 0xDEADBEEF); |
| 3193 | const deadbeef_bytes = switch (native_endian) { | 3191 | const deadbeef_bytes = switch (native_endian) { |
| 3194 | .Big => "\xDE\xAD\xBE\xEF", | 3192 | .Big => "\xDE\xAD\xBE\xEF", |
| ... | @@ -3282,8 +3280,6 @@ pub fn bytesAsValue(comptime T: type, bytes: anytype) BytesAsValueReturnType(T, | ... | @@ -3282,8 +3280,6 @@ pub fn bytesAsValue(comptime T: type, bytes: anytype) BytesAsValueReturnType(T, |
| 3282 | } | 3280 | } |
| 3283 | 3281 | ||
| 3284 | test "bytesAsValue" { | 3282 | test "bytesAsValue" { |
| 3285 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 3286 | |||
| 3287 | const deadbeef = @as(u32, 0xDEADBEEF); | 3283 | const deadbeef = @as(u32, 0xDEADBEEF); |
| 3288 | const deadbeef_bytes = switch (native_endian) { | 3284 | const deadbeef_bytes = switch (native_endian) { |
| 3289 | .Big => "\xDE\xAD\xBE\xEF", | 3285 | .Big => "\xDE\xAD\xBE\xEF", |
| ... | @@ -3485,8 +3481,6 @@ test "sliceAsBytes with sentinel slice" { | ... | @@ -3485,8 +3481,6 @@ test "sliceAsBytes with sentinel slice" { |
| 3485 | } | 3481 | } |
| 3486 | 3482 | ||
| 3487 | test "sliceAsBytes packed struct at runtime and comptime" { | 3483 | test "sliceAsBytes packed struct at runtime and comptime" { |
| 3488 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 3489 | |||
| 3490 | const Foo = packed struct { | 3484 | const Foo = packed struct { |
| 3491 | a: u4, | 3485 | a: u4, |
| 3492 | b: u4, | 3486 | b: u4, |
lib/std/mem/Allocator.zig+3-3| ... | @@ -20,7 +20,7 @@ pub const VTable = struct { | ... | @@ -20,7 +20,7 @@ pub const VTable = struct { |
| 20 | /// `ret_addr` is optionally provided as the first return address of the | 20 | /// `ret_addr` is optionally provided as the first return address of the |
| 21 | /// allocation call stack. If the value is `0` it means no return address | 21 | /// allocation call stack. If the value is `0` it means no return address |
| 22 | /// has been provided. | 22 | /// has been provided. |
| 23 | alloc: std.meta.FnPtr(fn (ctx: *anyopaque, len: usize, ptr_align: u8, ret_addr: usize) ?[*]u8), | 23 | alloc: *const fn (ctx: *anyopaque, len: usize, ptr_align: u8, ret_addr: usize) ?[*]u8, |
| 24 | 24 | ||
| 25 | /// Attempt to expand or shrink memory in place. `buf.len` must equal the | 25 | /// Attempt to expand or shrink memory in place. `buf.len` must equal the |
| 26 | /// length requested from the most recent successful call to `alloc` or | 26 | /// length requested from the most recent successful call to `alloc` or |
| ... | @@ -37,7 +37,7 @@ pub const VTable = struct { | ... | @@ -37,7 +37,7 @@ pub const VTable = struct { |
| 37 | /// `ret_addr` is optionally provided as the first return address of the | 37 | /// `ret_addr` is optionally provided as the first return address of the |
| 38 | /// allocation call stack. If the value is `0` it means no return address | 38 | /// allocation call stack. If the value is `0` it means no return address |
| 39 | /// has been provided. | 39 | /// has been provided. |
| 40 | resize: std.meta.FnPtr(fn (ctx: *anyopaque, buf: []u8, buf_align: u8, new_len: usize, ret_addr: usize) bool), | 40 | resize: *const fn (ctx: *anyopaque, buf: []u8, buf_align: u8, new_len: usize, ret_addr: usize) bool, |
| 41 | 41 | ||
| 42 | /// Free and invalidate a buffer. | 42 | /// Free and invalidate a buffer. |
| 43 | /// | 43 | /// |
| ... | @@ -50,7 +50,7 @@ pub const VTable = struct { | ... | @@ -50,7 +50,7 @@ pub const VTable = struct { |
| 50 | /// `ret_addr` is optionally provided as the first return address of the | 50 | /// `ret_addr` is optionally provided as the first return address of the |
| 51 | /// allocation call stack. If the value is `0` it means no return address | 51 | /// allocation call stack. If the value is `0` it means no return address |
| 52 | /// has been provided. | 52 | /// has been provided. |
| 53 | free: std.meta.FnPtr(fn (ctx: *anyopaque, buf: []u8, buf_align: u8, ret_addr: usize) void), | 53 | free: *const fn (ctx: *anyopaque, buf: []u8, buf_align: u8, ret_addr: usize) void, |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | pub fn noResize( | 56 | pub fn noResize( |
lib/std/meta.zig+2-34| ... | @@ -361,11 +361,7 @@ pub fn assumeSentinel(p: anytype, comptime sentinel_val: Elem(@TypeOf(p))) Senti | ... | @@ -361,11 +361,7 @@ pub fn assumeSentinel(p: anytype, comptime sentinel_val: Elem(@TypeOf(p))) Senti |
| 361 | const ReturnType = Sentinel(T, sentinel_val); | 361 | const ReturnType = Sentinel(T, sentinel_val); |
| 362 | switch (@typeInfo(T)) { | 362 | switch (@typeInfo(T)) { |
| 363 | .Pointer => |info| switch (info.size) { | 363 | .Pointer => |info| switch (info.size) { |
| 364 | .Slice => if (@import("builtin").zig_backend == .stage1) | 364 | .Slice, .Many, .One => return @ptrCast(ReturnType, p), |
| 365 | return @bitCast(ReturnType, p) | ||
| 366 | else | ||
| 367 | return @ptrCast(ReturnType, p), | ||
| 368 | .Many, .One => return @ptrCast(ReturnType, p), | ||
| 369 | .C => {}, | 365 | .C => {}, |
| 370 | }, | 366 | }, |
| 371 | .Optional => |info| switch (@typeInfo(info.child)) { | 367 | .Optional => |info| switch (@typeInfo(info.child)) { |
| ... | @@ -658,8 +654,6 @@ pub fn FieldEnum(comptime T: type) type { | ... | @@ -658,8 +654,6 @@ pub fn FieldEnum(comptime T: type) type { |
| 658 | const field_infos = fields(T); | 654 | const field_infos = fields(T); |
| 659 | 655 | ||
| 660 | if (field_infos.len == 0) { | 656 | if (field_infos.len == 0) { |
| 661 | // TODO simplify when stage1 is removed | ||
| 662 | if (@import("builtin").zig_backend == .stage1) @compileError("stage1 doesn't allow empty enums"); | ||
| 663 | return @Type(.{ | 657 | return @Type(.{ |
| 664 | .Enum = .{ | 658 | .Enum = .{ |
| 665 | .layout = .Auto, | 659 | .layout = .Auto, |
| ... | @@ -742,9 +736,7 @@ fn expectEqualEnum(expected: anytype, actual: @TypeOf(expected)) !void { | ... | @@ -742,9 +736,7 @@ fn expectEqualEnum(expected: anytype, actual: @TypeOf(expected)) !void { |
| 742 | } | 736 | } |
| 743 | 737 | ||
| 744 | test "std.meta.FieldEnum" { | 738 | test "std.meta.FieldEnum" { |
| 745 | if (comptime @import("builtin").zig_backend != .stage1) { | 739 | try expectEqualEnum(enum {}, FieldEnum(struct {})); |
| 746 | try expectEqualEnum(enum {}, FieldEnum(struct {})); | ||
| 747 | } | ||
| 748 | try expectEqualEnum(enum { a }, FieldEnum(struct { a: u8 })); | 740 | try expectEqualEnum(enum { a }, FieldEnum(struct { a: u8 })); |
| 749 | try expectEqualEnum(enum { a, b, c }, FieldEnum(struct { a: u8, b: void, c: f32 })); | 741 | try expectEqualEnum(enum { a, b, c }, FieldEnum(struct { a: u8, b: void, c: f32 })); |
| 750 | try expectEqualEnum(enum { a, b, c }, FieldEnum(union { a: u8, b: void, c: f32 })); | 742 | try expectEqualEnum(enum { a, b, c }, FieldEnum(union { a: u8, b: void, c: f32 })); |
| ... | @@ -1239,27 +1231,3 @@ test "isError" { | ... | @@ -1239,27 +1231,3 @@ test "isError" { |
| 1239 | try std.testing.expect(isError(math.absInt(@as(i8, -128)))); | 1231 | try std.testing.expect(isError(math.absInt(@as(i8, -128)))); |
| 1240 | try std.testing.expect(!isError(math.absInt(@as(i8, -127)))); | 1232 | try std.testing.expect(!isError(math.absInt(@as(i8, -127)))); |
| 1241 | } | 1233 | } |
| 1242 | |||
| 1243 | /// This function returns a function pointer for a given function signature. | ||
| 1244 | /// It's a helper to make code compatible to both stage1 and stage2. | ||
| 1245 | /// | ||
| 1246 | /// **WARNING:** This function is deprecated and will be removed together with stage1. | ||
| 1247 | pub fn FnPtr(comptime Fn: type) type { | ||
| 1248 | return if (@import("builtin").zig_backend != .stage1) | ||
| 1249 | *const Fn | ||
| 1250 | else | ||
| 1251 | Fn; | ||
| 1252 | } | ||
| 1253 | |||
| 1254 | test "FnPtr" { | ||
| 1255 | var func: FnPtr(fn () i64) = undefined; | ||
| 1256 | |||
| 1257 | // verify that we can perform runtime exchange | ||
| 1258 | // and not have a function body in stage2: | ||
| 1259 | |||
| 1260 | func = std.time.timestamp; | ||
| 1261 | _ = func(); | ||
| 1262 | |||
| 1263 | func = std.time.milliTimestamp; | ||
| 1264 | _ = func(); | ||
| 1265 | } |
lib/std/multi_array_list.zig+3-4| ... | @@ -90,13 +90,12 @@ pub fn MultiArrayList(comptime S: type) type { | ... | @@ -90,13 +90,12 @@ pub fn MultiArrayList(comptime S: type) type { |
| 90 | }; | 90 | }; |
| 91 | } | 91 | } |
| 92 | const Sort = struct { | 92 | const Sort = struct { |
| 93 | fn lessThan(trash: *i32, lhs: Data, rhs: Data) bool { | 93 | fn lessThan(context: void, lhs: Data, rhs: Data) bool { |
| 94 | _ = trash; | 94 | _ = context; |
| 95 | return lhs.alignment > rhs.alignment; | 95 | return lhs.alignment > rhs.alignment; |
| 96 | } | 96 | } |
| 97 | }; | 97 | }; |
| 98 | var trash: i32 = undefined; // workaround for stage1 compiler bug | 98 | std.sort.sort(Data, &data, {}, Sort.lessThan); |
| 99 | std.sort.sort(Data, &data, &trash, Sort.lessThan); | ||
| 100 | var sizes_bytes: [fields.len]usize = undefined; | 99 | var sizes_bytes: [fields.len]usize = undefined; |
| 101 | var field_indexes: [fields.len]usize = undefined; | 100 | var field_indexes: [fields.len]usize = undefined; |
| 102 | for (data) |elem, i| { | 101 | for (data) |elem, i| { |
lib/std/os.zig+2-2| ... | @@ -3621,7 +3621,7 @@ pub fn accept( | ... | @@ -3621,7 +3621,7 @@ pub fn accept( |
| 3621 | else => |err| return unexpectedErrno(err), | 3621 | else => |err| return unexpectedErrno(err), |
| 3622 | } | 3622 | } |
| 3623 | } | 3623 | } |
| 3624 | } else unreachable; | 3624 | }; |
| 3625 | 3625 | ||
| 3626 | if (!have_accept4) { | 3626 | if (!have_accept4) { |
| 3627 | try setSockFlags(accepted_sock, flags); | 3627 | try setSockFlags(accepted_sock, flags); |
| ... | @@ -5360,7 +5360,7 @@ pub fn toPosixPath(file_path: []const u8) ![MAX_PATH_BYTES - 1:0]u8 { | ... | @@ -5360,7 +5360,7 @@ pub fn toPosixPath(file_path: []const u8) ![MAX_PATH_BYTES - 1:0]u8 { |
| 5360 | /// if this happens the fix is to add the error code to the corresponding | 5360 | /// if this happens the fix is to add the error code to the corresponding |
| 5361 | /// switch expression, possibly introduce a new error in the error set, and | 5361 | /// switch expression, possibly introduce a new error in the error set, and |
| 5362 | /// send a patch to Zig. | 5362 | /// send a patch to Zig. |
| 5363 | pub const unexpected_error_tracing = (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and builtin.mode == .Debug; | 5363 | pub const unexpected_error_tracing = builtin.zig_backend == .stage2_llvm and builtin.mode == .Debug; |
| 5364 | 5364 | ||
| 5365 | pub const UnexpectedError = error{ | 5365 | pub const UnexpectedError = error{ |
| 5366 | /// The Operating System returned an undocumented error code. | 5366 | /// The Operating System returned an undocumented error code. |
lib/std/os/linux.zig+15-34| ... | @@ -936,16 +936,10 @@ pub fn flock(fd: fd_t, operation: i32) usize { | ... | @@ -936,16 +936,10 @@ pub fn flock(fd: fd_t, operation: i32) usize { |
| 936 | return syscall2(.flock, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, operation))); | 936 | return syscall2(.flock, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, operation))); |
| 937 | } | 937 | } |
| 938 | 938 | ||
| 939 | var vdso_clock_gettime = if (builtin.zig_backend == .stage1) | 939 | var vdso_clock_gettime = @ptrCast(?*const anyopaque, &init_vdso_clock_gettime); |
| 940 | @ptrCast(?*const anyopaque, init_vdso_clock_gettime) | ||
| 941 | else | ||
| 942 | @ptrCast(?*const anyopaque, &init_vdso_clock_gettime); | ||
| 943 | 940 | ||
| 944 | // We must follow the C calling convention when we call into the VDSO | 941 | // We must follow the C calling convention when we call into the VDSO |
| 945 | const vdso_clock_gettime_ty = if (builtin.zig_backend == .stage1) | 942 | const vdso_clock_gettime_ty = *align(1) const fn (i32, *timespec) callconv(.C) usize; |
| 946 | fn (i32, *timespec) callconv(.C) usize | ||
| 947 | else | ||
| 948 | *align(1) const fn (i32, *timespec) callconv(.C) usize; | ||
| 949 | 943 | ||
| 950 | pub fn clock_gettime(clk_id: i32, tp: *timespec) usize { | 944 | pub fn clock_gettime(clk_id: i32, tp: *timespec) usize { |
| 951 | if (@hasDecl(VDSO, "CGT_SYM")) { | 945 | if (@hasDecl(VDSO, "CGT_SYM")) { |
| ... | @@ -1151,8 +1145,8 @@ pub fn sigaction(sig: u6, noalias act: ?*const Sigaction, noalias oact: ?*Sigact | ... | @@ -1151,8 +1145,8 @@ pub fn sigaction(sig: u6, noalias act: ?*const Sigaction, noalias oact: ?*Sigact |
| 1151 | const mask_size = @sizeOf(@TypeOf(ksa.mask)); | 1145 | const mask_size = @sizeOf(@TypeOf(ksa.mask)); |
| 1152 | 1146 | ||
| 1153 | if (act) |new| { | 1147 | if (act) |new| { |
| 1154 | const restore_rt_ptr = if (builtin.zig_backend == .stage1) restore_rt else &restore_rt; | 1148 | const restore_rt_ptr = &restore_rt; |
| 1155 | const restore_ptr = if (builtin.zig_backend == .stage1) restore else &restore; | 1149 | const restore_ptr = &restore; |
| 1156 | const restorer_fn = if ((new.flags & SA.SIGINFO) != 0) restore_rt_ptr else restore_ptr; | 1150 | const restorer_fn = if ((new.flags & SA.SIGINFO) != 0) restore_rt_ptr else restore_ptr; |
| 1157 | ksa = k_sigaction{ | 1151 | ksa = k_sigaction{ |
| 1158 | .handler = new.handler.handler, | 1152 | .handler = new.handler.handler, |
| ... | @@ -3145,8 +3139,8 @@ pub const all_mask: sigset_t = [_]u32{0xffffffff} ** @typeInfo(sigset_t).Array.l | ... | @@ -3145,8 +3139,8 @@ pub const all_mask: sigset_t = [_]u32{0xffffffff} ** @typeInfo(sigset_t).Array.l |
| 3145 | pub const app_mask: sigset_t = [2]u32{ 0xfffffffc, 0x7fffffff } ++ [_]u32{0xffffffff} ** 30; | 3139 | pub const app_mask: sigset_t = [2]u32{ 0xfffffffc, 0x7fffffff } ++ [_]u32{0xffffffff} ** 30; |
| 3146 | 3140 | ||
| 3147 | const k_sigaction_funcs = struct { | 3141 | const k_sigaction_funcs = struct { |
| 3148 | const handler = ?std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 3142 | const handler = ?*const fn (c_int) align(1) callconv(.C) void; |
| 3149 | const restorer = std.meta.FnPtr(fn () callconv(.C) void); | 3143 | const restorer = *const fn () callconv(.C) void; |
| 3150 | }; | 3144 | }; |
| 3151 | 3145 | ||
| 3152 | pub const k_sigaction = switch (native_arch) { | 3146 | pub const k_sigaction = switch (native_arch) { |
| ... | @@ -3172,8 +3166,8 @@ pub const k_sigaction = switch (native_arch) { | ... | @@ -3172,8 +3166,8 @@ pub const k_sigaction = switch (native_arch) { |
| 3172 | 3166 | ||
| 3173 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 3167 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 3174 | pub const Sigaction = extern struct { | 3168 | pub const Sigaction = extern struct { |
| 3175 | pub const handler_fn = std.meta.FnPtr(fn (c_int) align(1) callconv(.C) void); | 3169 | pub const handler_fn = *const fn (c_int) align(1) callconv(.C) void; |
| 3176 | pub const sigaction_fn = std.meta.FnPtr(fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void); | 3170 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; |
| 3177 | 3171 | ||
| 3178 | handler: extern union { | 3172 | handler: extern union { |
| 3179 | handler: ?handler_fn, | 3173 | handler: ?handler_fn, |
| ... | @@ -3181,7 +3175,7 @@ pub const Sigaction = extern struct { | ... | @@ -3181,7 +3175,7 @@ pub const Sigaction = extern struct { |
| 3181 | }, | 3175 | }, |
| 3182 | mask: sigset_t, | 3176 | mask: sigset_t, |
| 3183 | flags: c_uint, | 3177 | flags: c_uint, |
| 3184 | restorer: ?std.meta.FnPtr(fn () callconv(.C) void) = null, | 3178 | restorer: ?*const fn () callconv(.C) void = null, |
| 3185 | }; | 3179 | }; |
| 3186 | 3180 | ||
| 3187 | pub const empty_sigset = [_]u32{0} ** @typeInfo(sigset_t).Array.len; | 3181 | pub const empty_sigset = [_]u32{0} ** @typeInfo(sigset_t).Array.len; |
| ... | @@ -3314,25 +3308,12 @@ pub const epoll_data = extern union { | ... | @@ -3314,25 +3308,12 @@ pub const epoll_data = extern union { |
| 3314 | u64: u64, | 3308 | u64: u64, |
| 3315 | }; | 3309 | }; |
| 3316 | 3310 | ||
| 3317 | pub const epoll_event = switch (builtin.zig_backend) { | 3311 | pub const epoll_event = extern struct { |
| 3318 | // stage1 crashes with the align(4) field so we have this workaround | 3312 | events: u32, |
| 3319 | .stage1 => switch (native_arch) { | 3313 | data: epoll_data align(switch (native_arch) { |
| 3320 | .x86_64 => packed struct { | 3314 | .x86_64 => 4, |
| 3321 | events: u32, | 3315 | else => @alignOf(epoll_data), |
| 3322 | data: epoll_data, | 3316 | }), |
| 3323 | }, | ||
| 3324 | else => extern struct { | ||
| 3325 | events: u32, | ||
| 3326 | data: epoll_data, | ||
| 3327 | }, | ||
| 3328 | }, | ||
| 3329 | else => extern struct { | ||
| 3330 | events: u32, | ||
| 3331 | data: epoll_data align(switch (native_arch) { | ||
| 3332 | .x86_64 => 4, | ||
| 3333 | else => @alignOf(epoll_data), | ||
| 3334 | }), | ||
| 3335 | }, | ||
| 3336 | }; | 3317 | }; |
| 3337 | 3318 | ||
| 3338 | pub const VFS_CAP_REVISION_MASK = 0xFF000000; | 3319 | pub const VFS_CAP_REVISION_MASK = 0xFF000000; |
lib/std/os/linux/arm-eabi.zig+1-1| ... | @@ -98,7 +98,7 @@ pub fn syscall6( | ... | @@ -98,7 +98,7 @@ pub fn syscall6( |
| 98 | ); | 98 | ); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 101 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 102 | 102 | ||
| 103 | /// This matches the libc clone function. | 103 | /// This matches the libc clone function. |
| 104 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 104 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/arm64.zig+1-1| ... | @@ -98,7 +98,7 @@ pub fn syscall6( | ... | @@ -98,7 +98,7 @@ pub fn syscall6( |
| 98 | ); | 98 | ); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 101 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 102 | 102 | ||
| 103 | /// This matches the libc clone function. | 103 | /// This matches the libc clone function. |
| 104 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 104 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/mips.zig+1-1| ... | @@ -190,7 +190,7 @@ pub fn syscall7( | ... | @@ -190,7 +190,7 @@ pub fn syscall7( |
| 190 | ); | 190 | ); |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 193 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 194 | 194 | ||
| 195 | /// This matches the libc clone function. | 195 | /// This matches the libc clone function. |
| 196 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 196 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/powerpc.zig+1-1| ... | @@ -126,7 +126,7 @@ pub fn syscall6( | ... | @@ -126,7 +126,7 @@ pub fn syscall6( |
| 126 | ); | 126 | ); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 129 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 130 | 130 | ||
| 131 | /// This matches the libc clone function. | 131 | /// This matches the libc clone function. |
| 132 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 132 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/powerpc64.zig+1-1| ... | @@ -126,7 +126,7 @@ pub fn syscall6( | ... | @@ -126,7 +126,7 @@ pub fn syscall6( |
| 126 | ); | 126 | ); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 129 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 130 | 130 | ||
| 131 | /// This matches the libc clone function. | 131 | /// This matches the libc clone function. |
| 132 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 132 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/riscv64.zig+1-1| ... | @@ -95,7 +95,7 @@ pub fn syscall6( | ... | @@ -95,7 +95,7 @@ pub fn syscall6( |
| 95 | ); | 95 | ); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 98 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 99 | 99 | ||
| 100 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 100 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
| 101 | 101 |
lib/std/os/linux/sparc64.zig+1-1| ... | @@ -178,7 +178,7 @@ pub fn syscall6( | ... | @@ -178,7 +178,7 @@ pub fn syscall6( |
| 178 | ); | 178 | ); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 181 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 182 | 182 | ||
| 183 | /// This matches the libc clone function. | 183 | /// This matches the libc clone function. |
| 184 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 184 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/x86.zig+1-1| ... | @@ -118,7 +118,7 @@ pub fn socketcall(call: usize, args: [*]usize) usize { | ... | @@ -118,7 +118,7 @@ pub fn socketcall(call: usize, args: [*]usize) usize { |
| 118 | ); | 118 | ); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 121 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 122 | 122 | ||
| 123 | /// This matches the libc clone function. | 123 | /// This matches the libc clone function. |
| 124 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 124 | pub extern fn clone(func: CloneFn, stack: usize, flags: u32, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/linux/x86_64.zig+1-1| ... | @@ -100,7 +100,7 @@ pub fn syscall6( | ... | @@ -100,7 +100,7 @@ pub fn syscall6( |
| 100 | ); | 100 | ); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | const CloneFn = std.meta.FnPtr(fn (arg: usize) callconv(.C) u8); | 103 | const CloneFn = *const fn (arg: usize) callconv(.C) u8; |
| 104 | 104 | ||
| 105 | /// This matches the libc clone function. | 105 | /// This matches the libc clone function. |
| 106 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; | 106 | pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize; |
lib/std/os/test.zig+2-4| ... | @@ -785,10 +785,8 @@ test "sigaction" { | ... | @@ -785,10 +785,8 @@ test "sigaction" { |
| 785 | } | 785 | } |
| 786 | }; | 786 | }; |
| 787 | 787 | ||
| 788 | const actual_handler = if (builtin.zig_backend == .stage1) S.handler else &S.handler; | ||
| 789 | |||
| 790 | var sa = os.Sigaction{ | 788 | var sa = os.Sigaction{ |
| 791 | .handler = .{ .sigaction = actual_handler }, | 789 | .handler = .{ .sigaction = &S.handler }, |
| 792 | .mask = os.empty_sigset, | 790 | .mask = os.empty_sigset, |
| 793 | .flags = os.SA.SIGINFO | os.SA.RESETHAND, | 791 | .flags = os.SA.SIGINFO | os.SA.RESETHAND, |
| 794 | }; | 792 | }; |
| ... | @@ -799,7 +797,7 @@ test "sigaction" { | ... | @@ -799,7 +797,7 @@ test "sigaction" { |
| 799 | 797 | ||
| 800 | // Check that we can read it back correctly. | 798 | // Check that we can read it back correctly. |
| 801 | try os.sigaction(os.SIG.USR1, null, &old_sa); | 799 | try os.sigaction(os.SIG.USR1, null, &old_sa); |
| 802 | try testing.expectEqual(actual_handler, old_sa.handler.sigaction.?); | 800 | try testing.expectEqual(&S.handler, old_sa.handler.sigaction.?); |
| 803 | try testing.expect((old_sa.flags & os.SA.SIGINFO) != 0); | 801 | try testing.expect((old_sa.flags & os.SA.SIGINFO) != 0); |
| 804 | 802 | ||
| 805 | // Invoke the handler. | 803 | // Invoke the handler. |
lib/std/os/uefi/protocols/absolute_pointer_protocol.zig+2-2| ... | @@ -6,8 +6,8 @@ const Status = uefi.Status; | ... | @@ -6,8 +6,8 @@ const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | /// Protocol for touchscreens | 7 | /// Protocol for touchscreens |
| 8 | pub const AbsolutePointerProtocol = extern struct { | 8 | pub const AbsolutePointerProtocol = extern struct { |
| 9 | _reset: std.meta.FnPtr(fn (*const AbsolutePointerProtocol, bool) callconv(.C) Status), | 9 | _reset: *const fn (*const AbsolutePointerProtocol, bool) callconv(.C) Status, |
| 10 | _get_state: std.meta.FnPtr(fn (*const AbsolutePointerProtocol, *AbsolutePointerState) callconv(.C) Status), | 10 | _get_state: *const fn (*const AbsolutePointerProtocol, *AbsolutePointerState) callconv(.C) Status, |
| 11 | wait_for_input: Event, | 11 | wait_for_input: Event, |
| 12 | mode: *AbsolutePointerMode, | 12 | mode: *AbsolutePointerMode, |
| 13 | 13 |
lib/std/os/uefi/protocols/block_io_protocol.zig+4-4| ... | @@ -44,10 +44,10 @@ pub const BlockIoProtocol = extern struct { | ... | @@ -44,10 +44,10 @@ pub const BlockIoProtocol = extern struct { |
| 44 | revision: u64, | 44 | revision: u64, |
| 45 | media: *EfiBlockMedia, | 45 | media: *EfiBlockMedia, |
| 46 | 46 | ||
| 47 | _reset: std.meta.FnPtr(fn (*BlockIoProtocol, extended_verification: bool) callconv(.C) Status), | 47 | _reset: *const fn (*BlockIoProtocol, extended_verification: bool) callconv(.C) Status, |
| 48 | _read_blocks: std.meta.FnPtr(fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(.C) Status), | 48 | _read_blocks: *const fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(.C) Status, |
| 49 | _write_blocks: std.meta.FnPtr(fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(.C) Status), | 49 | _write_blocks: *const fn (*BlockIoProtocol, media_id: u32, lba: u64, buffer_size: usize, buf: [*]u8) callconv(.C) Status, |
| 50 | _flush_blocks: std.meta.FnPtr(fn (*BlockIoProtocol) callconv(.C) Status), | 50 | _flush_blocks: *const fn (*BlockIoProtocol) callconv(.C) Status, |
| 51 | 51 | ||
| 52 | /// Resets the block device hardware. | 52 | /// Resets the block device hardware. |
| 53 | pub fn reset(self: *Self, extended_verification: bool) Status { | 53 | pub fn reset(self: *Self, extended_verification: bool) Status { |
lib/std/os/uefi/protocols/edid_override_protocol.zig+1-1| ... | @@ -6,7 +6,7 @@ const Status = uefi.Status; | ... | @@ -6,7 +6,7 @@ const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | /// Override EDID information | 7 | /// Override EDID information |
| 8 | pub const EdidOverrideProtocol = extern struct { | 8 | pub const EdidOverrideProtocol = extern struct { |
| 9 | _get_edid: std.meta.FnPtr(fn (*const EdidOverrideProtocol, Handle, *EdidOverrideProtocolAttributes, *usize, *?[*]u8) callconv(.C) Status), | 9 | _get_edid: *const fn (*const EdidOverrideProtocol, Handle, *EdidOverrideProtocolAttributes, *usize, *?[*]u8) callconv(.C) Status, |
| 10 | 10 | ||
| 11 | /// Returns policy information and potentially a replacement EDID for the specified video output device. | 11 | /// Returns policy information and potentially a replacement EDID for the specified video output device. |
| 12 | pub fn getEdid( | 12 | pub fn getEdid( |
lib/std/os/uefi/protocols/file_protocol.zig+10-10| ... | @@ -7,16 +7,16 @@ const Status = uefi.Status; | ... | @@ -7,16 +7,16 @@ const Status = uefi.Status; |
| 7 | 7 | ||
| 8 | pub const FileProtocol = extern struct { | 8 | pub const FileProtocol = extern struct { |
| 9 | revision: u64, | 9 | revision: u64, |
| 10 | _open: std.meta.FnPtr(fn (*const FileProtocol, **const FileProtocol, [*:0]const u16, u64, u64) callconv(.C) Status), | 10 | _open: *const fn (*const FileProtocol, **const FileProtocol, [*:0]const u16, u64, u64) callconv(.C) Status, |
| 11 | _close: std.meta.FnPtr(fn (*const FileProtocol) callconv(.C) Status), | 11 | _close: *const fn (*const FileProtocol) callconv(.C) Status, |
| 12 | _delete: std.meta.FnPtr(fn (*const FileProtocol) callconv(.C) Status), | 12 | _delete: *const fn (*const FileProtocol) callconv(.C) Status, |
| 13 | _read: std.meta.FnPtr(fn (*const FileProtocol, *usize, [*]u8) callconv(.C) Status), | 13 | _read: *const fn (*const FileProtocol, *usize, [*]u8) callconv(.C) Status, |
| 14 | _write: std.meta.FnPtr(fn (*const FileProtocol, *usize, [*]const u8) callconv(.C) Status), | 14 | _write: *const fn (*const FileProtocol, *usize, [*]const u8) callconv(.C) Status, |
| 15 | _get_position: std.meta.FnPtr(fn (*const FileProtocol, *u64) callconv(.C) Status), | 15 | _get_position: *const fn (*const FileProtocol, *u64) callconv(.C) Status, |
| 16 | _set_position: std.meta.FnPtr(fn (*const FileProtocol, u64) callconv(.C) Status), | 16 | _set_position: *const fn (*const FileProtocol, u64) callconv(.C) Status, |
| 17 | _get_info: std.meta.FnPtr(fn (*const FileProtocol, *align(8) const Guid, *const usize, [*]u8) callconv(.C) Status), | 17 | _get_info: *const fn (*const FileProtocol, *align(8) const Guid, *const usize, [*]u8) callconv(.C) Status, |
| 18 | _set_info: std.meta.FnPtr(fn (*const FileProtocol, *align(8) const Guid, usize, [*]const u8) callconv(.C) Status), | 18 | _set_info: *const fn (*const FileProtocol, *align(8) const Guid, usize, [*]const u8) callconv(.C) Status, |
| 19 | _flush: std.meta.FnPtr(fn (*const FileProtocol) callconv(.C) Status), | 19 | _flush: *const fn (*const FileProtocol) callconv(.C) Status, |
| 20 | 20 | ||
| 21 | pub const SeekError = error{SeekError}; | 21 | pub const SeekError = error{SeekError}; |
| 22 | pub const GetSeekPosError = error{GetSeekPosError}; | 22 | pub const GetSeekPosError = error{GetSeekPosError}; |
lib/std/os/uefi/protocols/graphics_output_protocol.zig+3-3| ... | @@ -5,9 +5,9 @@ const Status = uefi.Status; | ... | @@ -5,9 +5,9 @@ const Status = uefi.Status; |
| 5 | 5 | ||
| 6 | /// Graphics output | 6 | /// Graphics output |
| 7 | pub const GraphicsOutputProtocol = extern struct { | 7 | pub const GraphicsOutputProtocol = extern struct { |
| 8 | _query_mode: std.meta.FnPtr(fn (*const GraphicsOutputProtocol, u32, *usize, **GraphicsOutputModeInformation) callconv(.C) Status), | 8 | _query_mode: *const fn (*const GraphicsOutputProtocol, u32, *usize, **GraphicsOutputModeInformation) callconv(.C) Status, |
| 9 | _set_mode: std.meta.FnPtr(fn (*const GraphicsOutputProtocol, u32) callconv(.C) Status), | 9 | _set_mode: *const fn (*const GraphicsOutputProtocol, u32) callconv(.C) Status, |
| 10 | _blt: std.meta.FnPtr(fn (*const GraphicsOutputProtocol, ?[*]GraphicsOutputBltPixel, GraphicsOutputBltOperation, usize, usize, usize, usize, usize, usize, usize) callconv(.C) Status), | 10 | _blt: *const fn (*const GraphicsOutputProtocol, ?[*]GraphicsOutputBltPixel, GraphicsOutputBltOperation, usize, usize, usize, usize, usize, usize, usize) callconv(.C) Status, |
| 11 | mode: *GraphicsOutputProtocolMode, | 11 | mode: *GraphicsOutputProtocolMode, |
| 12 | 12 | ||
| 13 | /// Returns information for an available graphics mode that the graphics device and the set of active video output devices supports. | 13 | /// Returns information for an available graphics mode that the graphics device and the set of active video output devices supports. |
lib/std/os/uefi/protocols/hii_database_protocol.zig+4-4| ... | @@ -7,10 +7,10 @@ const hii = uefi.protocols.hii; | ... | @@ -7,10 +7,10 @@ const hii = uefi.protocols.hii; |
| 7 | /// Database manager for HII-related data structures. | 7 | /// Database manager for HII-related data structures. |
| 8 | pub const HIIDatabaseProtocol = extern struct { | 8 | pub const HIIDatabaseProtocol = extern struct { |
| 9 | _new_package_list: Status, // TODO | 9 | _new_package_list: Status, // TODO |
| 10 | _remove_package_list: std.meta.FnPtr(fn (*const HIIDatabaseProtocol, hii.HIIHandle) callconv(.C) Status), | 10 | _remove_package_list: *const fn (*const HIIDatabaseProtocol, hii.HIIHandle) callconv(.C) Status, |
| 11 | _update_package_list: std.meta.FnPtr(fn (*const HIIDatabaseProtocol, hii.HIIHandle, *const hii.HIIPackageList) callconv(.C) Status), | 11 | _update_package_list: *const fn (*const HIIDatabaseProtocol, hii.HIIHandle, *const hii.HIIPackageList) callconv(.C) Status, |
| 12 | _list_package_lists: std.meta.FnPtr(fn (*const HIIDatabaseProtocol, u8, ?*const Guid, *usize, [*]hii.HIIHandle) callconv(.C) Status), | 12 | _list_package_lists: *const fn (*const HIIDatabaseProtocol, u8, ?*const Guid, *usize, [*]hii.HIIHandle) callconv(.C) Status, |
| 13 | _export_package_lists: std.meta.FnPtr(fn (*const HIIDatabaseProtocol, ?hii.HIIHandle, *usize, *hii.HIIPackageList) callconv(.C) Status), | 13 | _export_package_lists: *const fn (*const HIIDatabaseProtocol, ?hii.HIIHandle, *usize, *hii.HIIPackageList) callconv(.C) Status, |
| 14 | _register_package_notify: Status, // TODO | 14 | _register_package_notify: Status, // TODO |
| 15 | _unregister_package_notify: Status, // TODO | 15 | _unregister_package_notify: Status, // TODO |
| 16 | _find_keyboard_layouts: Status, // TODO | 16 | _find_keyboard_layouts: Status, // TODO |
lib/std/os/uefi/protocols/hii_popup_protocol.zig+1-1| ... | @@ -7,7 +7,7 @@ const hii = uefi.protocols.hii; | ... | @@ -7,7 +7,7 @@ const hii = uefi.protocols.hii; |
| 7 | /// Display a popup window | 7 | /// Display a popup window |
| 8 | pub const HIIPopupProtocol = extern struct { | 8 | pub const HIIPopupProtocol = extern struct { |
| 9 | revision: u64, | 9 | revision: u64, |
| 10 | _create_popup: std.meta.FnPtr(fn (*const HIIPopupProtocol, HIIPopupStyle, HIIPopupType, hii.HIIHandle, u16, ?*HIIPopupSelection) callconv(.C) Status), | 10 | _create_popup: *const fn (*const HIIPopupProtocol, HIIPopupStyle, HIIPopupType, hii.HIIHandle, u16, ?*HIIPopupSelection) callconv(.C) Status, |
| 11 | 11 | ||
| 12 | /// Displays a popup window. | 12 | /// Displays a popup window. |
| 13 | pub fn createPopup(self: *const HIIPopupProtocol, style: HIIPopupStyle, popup_type: HIIPopupType, handle: hii.HIIHandle, msg: u16, user_selection: ?*HIIPopupSelection) Status { | 13 | pub fn createPopup(self: *const HIIPopupProtocol, style: HIIPopupStyle, popup_type: HIIPopupType, handle: hii.HIIHandle, msg: u16, user_selection: ?*HIIPopupSelection) Status { |
lib/std/os/uefi/protocols/ip6_config_protocol.zig+4-4| ... | @@ -5,10 +5,10 @@ const Event = uefi.Event; | ... | @@ -5,10 +5,10 @@ const Event = uefi.Event; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | pub const Ip6ConfigProtocol = extern struct { | 7 | pub const Ip6ConfigProtocol = extern struct { |
| 8 | _set_data: std.meta.FnPtr(fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, usize, *const anyopaque) callconv(.C) Status), | 8 | _set_data: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, usize, *const anyopaque) callconv(.C) Status, |
| 9 | _get_data: std.meta.FnPtr(fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, *usize, ?*const anyopaque) callconv(.C) Status), | 9 | _get_data: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, *usize, ?*const anyopaque) callconv(.C) Status, |
| 10 | _register_data_notify: std.meta.FnPtr(fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(.C) Status), | 10 | _register_data_notify: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(.C) Status, |
| 11 | _unregister_data_notify: std.meta.FnPtr(fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(.C) Status), | 11 | _unregister_data_notify: *const fn (*const Ip6ConfigProtocol, Ip6ConfigDataType, Event) callconv(.C) Status, |
| 12 | 12 | ||
| 13 | pub fn setData(self: *const Ip6ConfigProtocol, data_type: Ip6ConfigDataType, data_size: usize, data: *const anyopaque) Status { | 13 | pub fn setData(self: *const Ip6ConfigProtocol, data_type: Ip6ConfigDataType, data_size: usize, data: *const anyopaque) Status { |
| 14 | return self._set_data(self, data_type, data_size, data); | 14 | return self._set_data(self, data_type, data_size, data); |
lib/std/os/uefi/protocols/ip6_protocol.zig+9-9| ... | @@ -8,15 +8,15 @@ const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; | ... | @@ -8,15 +8,15 @@ const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; |
| 8 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; | 8 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; |
| 9 | 9 | ||
| 10 | pub const Ip6Protocol = extern struct { | 10 | pub const Ip6Protocol = extern struct { |
| 11 | _get_mode_data: std.meta.FnPtr(fn (*const Ip6Protocol, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status), | 11 | _get_mode_data: *const fn (*const Ip6Protocol, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status, |
| 12 | _configure: std.meta.FnPtr(fn (*const Ip6Protocol, ?*const Ip6ConfigData) callconv(.C) Status), | 12 | _configure: *const fn (*const Ip6Protocol, ?*const Ip6ConfigData) callconv(.C) Status, |
| 13 | _groups: std.meta.FnPtr(fn (*const Ip6Protocol, bool, ?*const Ip6Address) callconv(.C) Status), | 13 | _groups: *const fn (*const Ip6Protocol, bool, ?*const Ip6Address) callconv(.C) Status, |
| 14 | _routes: std.meta.FnPtr(fn (*const Ip6Protocol, bool, ?*const Ip6Address, u8, ?*const Ip6Address) callconv(.C) Status), | 14 | _routes: *const fn (*const Ip6Protocol, bool, ?*const Ip6Address, u8, ?*const Ip6Address) callconv(.C) Status, |
| 15 | _neighbors: std.meta.FnPtr(fn (*const Ip6Protocol, bool, *const Ip6Address, ?*const MacAddress, u32, bool) callconv(.C) Status), | 15 | _neighbors: *const fn (*const Ip6Protocol, bool, *const Ip6Address, ?*const MacAddress, u32, bool) callconv(.C) Status, |
| 16 | _transmit: std.meta.FnPtr(fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(.C) Status), | 16 | _transmit: *const fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(.C) Status, |
| 17 | _receive: std.meta.FnPtr(fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(.C) Status), | 17 | _receive: *const fn (*const Ip6Protocol, *Ip6CompletionToken) callconv(.C) Status, |
| 18 | _cancel: std.meta.FnPtr(fn (*const Ip6Protocol, ?*Ip6CompletionToken) callconv(.C) Status), | 18 | _cancel: *const fn (*const Ip6Protocol, ?*Ip6CompletionToken) callconv(.C) Status, |
| 19 | _poll: std.meta.FnPtr(fn (*const Ip6Protocol) callconv(.C) Status), | 19 | _poll: *const fn (*const Ip6Protocol) callconv(.C) Status, |
| 20 | 20 | ||
| 21 | /// Gets the current operational settings for this instance of the EFI IPv6 Protocol driver. | 21 | /// Gets the current operational settings for this instance of the EFI IPv6 Protocol driver. |
| 22 | pub fn getModeData(self: *const Ip6Protocol, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { | 22 | pub fn getModeData(self: *const Ip6Protocol, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { |
lib/std/os/uefi/protocols/ip6_service_binding_protocol.zig+2-2| ... | @@ -5,8 +5,8 @@ const Guid = uefi.Guid; | ... | @@ -5,8 +5,8 @@ const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | pub const Ip6ServiceBindingProtocol = extern struct { | 7 | pub const Ip6ServiceBindingProtocol = extern struct { |
| 8 | _create_child: std.meta.FnPtr(fn (*const Ip6ServiceBindingProtocol, *?Handle) callconv(.C) Status), | 8 | _create_child: *const fn (*const Ip6ServiceBindingProtocol, *?Handle) callconv(.C) Status, |
| 9 | _destroy_child: std.meta.FnPtr(fn (*const Ip6ServiceBindingProtocol, Handle) callconv(.C) Status), | 9 | _destroy_child: *const fn (*const Ip6ServiceBindingProtocol, Handle) callconv(.C) Status, |
| 10 | 10 | ||
| 11 | pub fn createChild(self: *const Ip6ServiceBindingProtocol, handle: *?Handle) Status { | 11 | pub fn createChild(self: *const Ip6ServiceBindingProtocol, handle: *?Handle) Status { |
| 12 | return self._create_child(self, handle); | 12 | return self._create_child(self, handle); |
lib/std/os/uefi/protocols/loaded_image_protocol.zig+1-1| ... | @@ -20,7 +20,7 @@ pub const LoadedImageProtocol = extern struct { | ... | @@ -20,7 +20,7 @@ pub const LoadedImageProtocol = extern struct { |
| 20 | image_size: u64, | 20 | image_size: u64, |
| 21 | image_code_type: MemoryType, | 21 | image_code_type: MemoryType, |
| 22 | image_data_type: MemoryType, | 22 | image_data_type: MemoryType, |
| 23 | _unload: std.meta.FnPtr(fn (*const LoadedImageProtocol, Handle) callconv(.C) Status), | 23 | _unload: *const fn (*const LoadedImageProtocol, Handle) callconv(.C) Status, |
| 24 | 24 | ||
| 25 | /// Unloads an image from memory. | 25 | /// Unloads an image from memory. |
| 26 | pub fn unload(self: *const LoadedImageProtocol, handle: Handle) Status { | 26 | pub fn unload(self: *const LoadedImageProtocol, handle: Handle) Status { |
lib/std/os/uefi/protocols/managed_network_protocol.zig+8-8| ... | @@ -8,14 +8,14 @@ const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; | ... | @@ -8,14 +8,14 @@ const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; |
| 8 | const MacAddress = uefi.protocols.MacAddress; | 8 | const MacAddress = uefi.protocols.MacAddress; |
| 9 | 9 | ||
| 10 | pub const ManagedNetworkProtocol = extern struct { | 10 | pub const ManagedNetworkProtocol = extern struct { |
| 11 | _get_mode_data: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status), | 11 | _get_mode_data: *const fn (*const ManagedNetworkProtocol, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status, |
| 12 | _configure: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkConfigData) callconv(.C) Status), | 12 | _configure: *const fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkConfigData) callconv(.C) Status, |
| 13 | _mcast_ip_to_mac: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(.C) Status), | 13 | _mcast_ip_to_mac: *const fn (*const ManagedNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(.C) Status, |
| 14 | _groups: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, bool, ?*const MacAddress) callconv(.C) Status), | 14 | _groups: *const fn (*const ManagedNetworkProtocol, bool, ?*const MacAddress) callconv(.C) Status, |
| 15 | _transmit: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status), | 15 | _transmit: *const fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status, |
| 16 | _receive: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status), | 16 | _receive: *const fn (*const ManagedNetworkProtocol, *const ManagedNetworkCompletionToken) callconv(.C) Status, |
| 17 | _cancel: std.meta.FnPtr(fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkCompletionToken) callconv(.C) Status), | 17 | _cancel: *const fn (*const ManagedNetworkProtocol, ?*const ManagedNetworkCompletionToken) callconv(.C) Status, |
| 18 | _poll: std.meta.FnPtr(fn (*const ManagedNetworkProtocol) callconv(.C) Status), | 18 | _poll: *const fn (*const ManagedNetworkProtocol) callconv(.C) Status, |
| 19 | 19 | ||
| 20 | /// Returns the operational parameters for the current MNP child driver. | 20 | /// Returns the operational parameters for the current MNP child driver. |
| 21 | /// May also support returning the underlying SNP driver mode data. | 21 | /// May also support returning the underlying SNP driver mode data. |
lib/std/os/uefi/protocols/managed_network_service_binding_protocol.zig+2-2| ... | @@ -5,8 +5,8 @@ const Guid = uefi.Guid; | ... | @@ -5,8 +5,8 @@ const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | pub const ManagedNetworkServiceBindingProtocol = extern struct { | 7 | pub const ManagedNetworkServiceBindingProtocol = extern struct { |
| 8 | _create_child: std.meta.FnPtr(fn (*const ManagedNetworkServiceBindingProtocol, *?Handle) callconv(.C) Status), | 8 | _create_child: *const fn (*const ManagedNetworkServiceBindingProtocol, *?Handle) callconv(.C) Status, |
| 9 | _destroy_child: std.meta.FnPtr(fn (*const ManagedNetworkServiceBindingProtocol, Handle) callconv(.C) Status), | 9 | _destroy_child: *const fn (*const ManagedNetworkServiceBindingProtocol, Handle) callconv(.C) Status, |
| 10 | 10 | ||
| 11 | pub fn createChild(self: *const ManagedNetworkServiceBindingProtocol, handle: *?Handle) Status { | 11 | pub fn createChild(self: *const ManagedNetworkServiceBindingProtocol, handle: *?Handle) Status { |
| 12 | return self._create_child(self, handle); | 12 | return self._create_child(self, handle); |
lib/std/os/uefi/protocols/rng_protocol.zig+2-2| ... | @@ -5,8 +5,8 @@ const Status = uefi.Status; | ... | @@ -5,8 +5,8 @@ const Status = uefi.Status; |
| 5 | 5 | ||
| 6 | /// Random Number Generator protocol | 6 | /// Random Number Generator protocol |
| 7 | pub const RNGProtocol = extern struct { | 7 | pub const RNGProtocol = extern struct { |
| 8 | _get_info: std.meta.FnPtr(fn (*const RNGProtocol, *usize, [*]align(8) Guid) callconv(.C) Status), | 8 | _get_info: *const fn (*const RNGProtocol, *usize, [*]align(8) Guid) callconv(.C) Status, |
| 9 | _get_rng: std.meta.FnPtr(fn (*const RNGProtocol, ?*align(8) const Guid, usize, [*]u8) callconv(.C) Status), | 9 | _get_rng: *const fn (*const RNGProtocol, ?*align(8) const Guid, usize, [*]u8) callconv(.C) Status, |
| 10 | 10 | ||
| 11 | /// Returns information about the random number generation implementation. | 11 | /// Returns information about the random number generation implementation. |
| 12 | pub fn getInfo(self: *const RNGProtocol, list_size: *usize, list: [*]align(8) Guid) Status { | 12 | pub fn getInfo(self: *const RNGProtocol, list_size: *usize, list: [*]align(8) Guid) Status { |
lib/std/os/uefi/protocols/simple_file_system_protocol.zig+1-1| ... | @@ -6,7 +6,7 @@ const Status = uefi.Status; | ... | @@ -6,7 +6,7 @@ const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | pub const SimpleFileSystemProtocol = extern struct { | 7 | pub const SimpleFileSystemProtocol = extern struct { |
| 8 | revision: u64, | 8 | revision: u64, |
| 9 | _open_volume: std.meta.FnPtr(fn (*const SimpleFileSystemProtocol, **const FileProtocol) callconv(.C) Status), | 9 | _open_volume: *const fn (*const SimpleFileSystemProtocol, **const FileProtocol) callconv(.C) Status, |
| 10 | 10 | ||
| 11 | pub fn openVolume(self: *const SimpleFileSystemProtocol, root: **const FileProtocol) Status { | 11 | pub fn openVolume(self: *const SimpleFileSystemProtocol, root: **const FileProtocol) Status { |
| 12 | return self._open_volume(self, root); | 12 | return self._open_volume(self, root); |
lib/std/os/uefi/protocols/simple_network_protocol.zig+13-13| ... | @@ -6,19 +6,19 @@ const Status = uefi.Status; | ... | @@ -6,19 +6,19 @@ const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | pub const SimpleNetworkProtocol = extern struct { | 7 | pub const SimpleNetworkProtocol = extern struct { |
| 8 | revision: u64, | 8 | revision: u64, |
| 9 | _start: std.meta.FnPtr(fn (*const SimpleNetworkProtocol) callconv(.C) Status), | 9 | _start: *const fn (*const SimpleNetworkProtocol) callconv(.C) Status, |
| 10 | _stop: std.meta.FnPtr(fn (*const SimpleNetworkProtocol) callconv(.C) Status), | 10 | _stop: *const fn (*const SimpleNetworkProtocol) callconv(.C) Status, |
| 11 | _initialize: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, usize, usize) callconv(.C) Status), | 11 | _initialize: *const fn (*const SimpleNetworkProtocol, usize, usize) callconv(.C) Status, |
| 12 | _reset: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, bool) callconv(.C) Status), | 12 | _reset: *const fn (*const SimpleNetworkProtocol, bool) callconv(.C) Status, |
| 13 | _shutdown: std.meta.FnPtr(fn (*const SimpleNetworkProtocol) callconv(.C) Status), | 13 | _shutdown: *const fn (*const SimpleNetworkProtocol) callconv(.C) Status, |
| 14 | _receive_filters: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, SimpleNetworkReceiveFilter, SimpleNetworkReceiveFilter, bool, usize, ?[*]const MacAddress) callconv(.C) Status), | 14 | _receive_filters: *const fn (*const SimpleNetworkProtocol, SimpleNetworkReceiveFilter, SimpleNetworkReceiveFilter, bool, usize, ?[*]const MacAddress) callconv(.C) Status, |
| 15 | _station_address: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, bool, ?*const MacAddress) callconv(.C) Status), | 15 | _station_address: *const fn (*const SimpleNetworkProtocol, bool, ?*const MacAddress) callconv(.C) Status, |
| 16 | _statistics: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, bool, ?*usize, ?*NetworkStatistics) callconv(.C) Status), | 16 | _statistics: *const fn (*const SimpleNetworkProtocol, bool, ?*usize, ?*NetworkStatistics) callconv(.C) Status, |
| 17 | _mcast_ip_to_mac: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(.C) Status), | 17 | _mcast_ip_to_mac: *const fn (*const SimpleNetworkProtocol, bool, *const anyopaque, *MacAddress) callconv(.C) Status, |
| 18 | _nvdata: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, bool, usize, usize, [*]u8) callconv(.C) Status), | 18 | _nvdata: *const fn (*const SimpleNetworkProtocol, bool, usize, usize, [*]u8) callconv(.C) Status, |
| 19 | _get_status: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, *SimpleNetworkInterruptStatus, ?*?[*]u8) callconv(.C) Status), | 19 | _get_status: *const fn (*const SimpleNetworkProtocol, *SimpleNetworkInterruptStatus, ?*?[*]u8) callconv(.C) Status, |
| 20 | _transmit: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, usize, usize, [*]const u8, ?*const MacAddress, ?*const MacAddress, ?*const u16) callconv(.C) Status), | 20 | _transmit: *const fn (*const SimpleNetworkProtocol, usize, usize, [*]const u8, ?*const MacAddress, ?*const MacAddress, ?*const u16) callconv(.C) Status, |
| 21 | _receive: std.meta.FnPtr(fn (*const SimpleNetworkProtocol, ?*usize, *usize, [*]u8, ?*MacAddress, ?*MacAddress, ?*u16) callconv(.C) Status), | 21 | _receive: *const fn (*const SimpleNetworkProtocol, ?*usize, *usize, [*]u8, ?*MacAddress, ?*MacAddress, ?*u16) callconv(.C) Status, |
| 22 | wait_for_packet: Event, | 22 | wait_for_packet: Event, |
| 23 | mode: *SimpleNetworkMode, | 23 | mode: *SimpleNetworkMode, |
| 24 | 24 |
lib/std/os/uefi/protocols/simple_pointer_protocol.zig+2-2| ... | @@ -6,8 +6,8 @@ const Status = uefi.Status; | ... | @@ -6,8 +6,8 @@ const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | /// Protocol for mice | 7 | /// Protocol for mice |
| 8 | pub const SimplePointerProtocol = struct { | 8 | pub const SimplePointerProtocol = struct { |
| 9 | _reset: std.meta.FnPtr(fn (*const SimplePointerProtocol, bool) callconv(.C) Status), | 9 | _reset: *const fn (*const SimplePointerProtocol, bool) callconv(.C) Status, |
| 10 | _get_state: std.meta.FnPtr(fn (*const SimplePointerProtocol, *SimplePointerState) callconv(.C) Status), | 10 | _get_state: *const fn (*const SimplePointerProtocol, *SimplePointerState) callconv(.C) Status, |
| 11 | wait_for_input: Event, | 11 | wait_for_input: Event, |
| 12 | mode: *SimplePointerMode, | 12 | mode: *SimplePointerMode, |
| 13 | 13 |
lib/std/os/uefi/protocols/simple_text_input_ex_protocol.zig+6-6| ... | @@ -6,12 +6,12 @@ const Status = uefi.Status; | ... | @@ -6,12 +6,12 @@ const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | /// Character input devices, e.g. Keyboard | 7 | /// Character input devices, e.g. Keyboard |
| 8 | pub const SimpleTextInputExProtocol = extern struct { | 8 | pub const SimpleTextInputExProtocol = extern struct { |
| 9 | _reset: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, bool) callconv(.C) Status), | 9 | _reset: *const fn (*const SimpleTextInputExProtocol, bool) callconv(.C) Status, |
| 10 | _read_key_stroke_ex: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *KeyData) callconv(.C) Status), | 10 | _read_key_stroke_ex: *const fn (*const SimpleTextInputExProtocol, *KeyData) callconv(.C) Status, |
| 11 | wait_for_key_ex: Event, | 11 | wait_for_key_ex: Event, |
| 12 | _set_state: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const u8) callconv(.C) Status), | 12 | _set_state: *const fn (*const SimpleTextInputExProtocol, *const u8) callconv(.C) Status, |
| 13 | _register_key_notify: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const KeyData, std.meta.FnPtr(fn (*const KeyData) callconv(.C) usize), **anyopaque) callconv(.C) Status), | 13 | _register_key_notify: *const fn (*const SimpleTextInputExProtocol, *const KeyData, *const fn (*const KeyData) callconv(.C) usize, **anyopaque) callconv(.C) Status, |
| 14 | _unregister_key_notify: std.meta.FnPtr(fn (*const SimpleTextInputExProtocol, *const anyopaque) callconv(.C) Status), | 14 | _unregister_key_notify: *const fn (*const SimpleTextInputExProtocol, *const anyopaque) callconv(.C) Status, |
| 15 | 15 | ||
| 16 | /// Resets the input device hardware. | 16 | /// Resets the input device hardware. |
| 17 | pub fn reset(self: *const SimpleTextInputExProtocol, verify: bool) Status { | 17 | pub fn reset(self: *const SimpleTextInputExProtocol, verify: bool) Status { |
| ... | @@ -29,7 +29,7 @@ pub const SimpleTextInputExProtocol = extern struct { | ... | @@ -29,7 +29,7 @@ pub const SimpleTextInputExProtocol = extern struct { |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | /// Register a notification function for a particular keystroke for the input device. | 31 | /// Register a notification function for a particular keystroke for the input device. |
| 32 | pub fn registerKeyNotify(self: *const SimpleTextInputExProtocol, key_data: *const KeyData, notify: std.meta.FnPtr(fn (*const KeyData) callconv(.C) usize), handle: **anyopaque) Status { | 32 | pub fn registerKeyNotify(self: *const SimpleTextInputExProtocol, key_data: *const KeyData, notify: *const fn (*const KeyData) callconv(.C) usize, handle: **anyopaque) Status { |
| 33 | return self._register_key_notify(self, key_data, notify, handle); | 33 | return self._register_key_notify(self, key_data, notify, handle); |
| 34 | } | 34 | } |
| 35 | 35 |
lib/std/os/uefi/protocols/simple_text_input_protocol.zig+2-2| ... | @@ -7,8 +7,8 @@ const Status = uefi.Status; | ... | @@ -7,8 +7,8 @@ const Status = uefi.Status; |
| 7 | 7 | ||
| 8 | /// Character input devices, e.g. Keyboard | 8 | /// Character input devices, e.g. Keyboard |
| 9 | pub const SimpleTextInputProtocol = extern struct { | 9 | pub const SimpleTextInputProtocol = extern struct { |
| 10 | _reset: std.meta.FnPtr(fn (*const SimpleTextInputProtocol, bool) callconv(.C) Status), | 10 | _reset: *const fn (*const SimpleTextInputProtocol, bool) callconv(.C) Status, |
| 11 | _read_key_stroke: std.meta.FnPtr(fn (*const SimpleTextInputProtocol, *InputKey) callconv(.C) Status), | 11 | _read_key_stroke: *const fn (*const SimpleTextInputProtocol, *InputKey) callconv(.C) Status, |
| 12 | wait_for_key: Event, | 12 | wait_for_key: Event, |
| 13 | 13 | ||
| 14 | /// Resets the input device hardware. | 14 | /// Resets the input device hardware. |
lib/std/os/uefi/protocols/simple_text_output_protocol.zig+9-9| ... | @@ -5,15 +5,15 @@ const Status = uefi.Status; | ... | @@ -5,15 +5,15 @@ const Status = uefi.Status; |
| 5 | 5 | ||
| 6 | /// Character output devices | 6 | /// Character output devices |
| 7 | pub const SimpleTextOutputProtocol = extern struct { | 7 | pub const SimpleTextOutputProtocol = extern struct { |
| 8 | _reset: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status), | 8 | _reset: *const fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status, |
| 9 | _output_string: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status), | 9 | _output_string: *const fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status, |
| 10 | _test_string: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status), | 10 | _test_string: *const fn (*const SimpleTextOutputProtocol, [*:0]const u16) callconv(.C) Status, |
| 11 | _query_mode: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, usize, *usize, *usize) callconv(.C) Status), | 11 | _query_mode: *const fn (*const SimpleTextOutputProtocol, usize, *usize, *usize) callconv(.C) Status, |
| 12 | _set_mode: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status), | 12 | _set_mode: *const fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status, |
| 13 | _set_attribute: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status), | 13 | _set_attribute: *const fn (*const SimpleTextOutputProtocol, usize) callconv(.C) Status, |
| 14 | _clear_screen: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol) callconv(.C) Status), | 14 | _clear_screen: *const fn (*const SimpleTextOutputProtocol) callconv(.C) Status, |
| 15 | _set_cursor_position: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, usize, usize) callconv(.C) Status), | 15 | _set_cursor_position: *const fn (*const SimpleTextOutputProtocol, usize, usize) callconv(.C) Status, |
| 16 | _enable_cursor: std.meta.FnPtr(fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status), | 16 | _enable_cursor: *const fn (*const SimpleTextOutputProtocol, bool) callconv(.C) Status, |
| 17 | mode: *SimpleTextOutputMode, | 17 | mode: *SimpleTextOutputMode, |
| 18 | 18 | ||
| 19 | /// Resets the text output device hardware. | 19 | /// Resets the text output device hardware. |
lib/std/os/uefi/protocols/udp6_protocol.zig+7-7| ... | @@ -10,13 +10,13 @@ const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; | ... | @@ -10,13 +10,13 @@ const ManagedNetworkConfigData = uefi.protocols.ManagedNetworkConfigData; |
| 10 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; | 10 | const SimpleNetworkMode = uefi.protocols.SimpleNetworkMode; |
| 11 | 11 | ||
| 12 | pub const Udp6Protocol = extern struct { | 12 | pub const Udp6Protocol = extern struct { |
| 13 | _get_mode_data: std.meta.FnPtr(fn (*const Udp6Protocol, ?*Udp6ConfigData, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status), | 13 | _get_mode_data: *const fn (*const Udp6Protocol, ?*Udp6ConfigData, ?*Ip6ModeData, ?*ManagedNetworkConfigData, ?*SimpleNetworkMode) callconv(.C) Status, |
| 14 | _configure: std.meta.FnPtr(fn (*const Udp6Protocol, ?*const Udp6ConfigData) callconv(.C) Status), | 14 | _configure: *const fn (*const Udp6Protocol, ?*const Udp6ConfigData) callconv(.C) Status, |
| 15 | _groups: std.meta.FnPtr(fn (*const Udp6Protocol, bool, ?*const Ip6Address) callconv(.C) Status), | 15 | _groups: *const fn (*const Udp6Protocol, bool, ?*const Ip6Address) callconv(.C) Status, |
| 16 | _transmit: std.meta.FnPtr(fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(.C) Status), | 16 | _transmit: *const fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(.C) Status, |
| 17 | _receive: std.meta.FnPtr(fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(.C) Status), | 17 | _receive: *const fn (*const Udp6Protocol, *Udp6CompletionToken) callconv(.C) Status, |
| 18 | _cancel: std.meta.FnPtr(fn (*const Udp6Protocol, ?*Udp6CompletionToken) callconv(.C) Status), | 18 | _cancel: *const fn (*const Udp6Protocol, ?*Udp6CompletionToken) callconv(.C) Status, |
| 19 | _poll: std.meta.FnPtr(fn (*const Udp6Protocol) callconv(.C) Status), | 19 | _poll: *const fn (*const Udp6Protocol) callconv(.C) Status, |
| 20 | 20 | ||
| 21 | pub fn getModeData(self: *const Udp6Protocol, udp6_config_data: ?*Udp6ConfigData, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { | 21 | pub fn getModeData(self: *const Udp6Protocol, udp6_config_data: ?*Udp6ConfigData, ip6_mode_data: ?*Ip6ModeData, mnp_config_data: ?*ManagedNetworkConfigData, snp_mode_data: ?*SimpleNetworkMode) Status { |
| 22 | return self._get_mode_data(self, udp6_config_data, ip6_mode_data, mnp_config_data, snp_mode_data); | 22 | return self._get_mode_data(self, udp6_config_data, ip6_mode_data, mnp_config_data, snp_mode_data); |
lib/std/os/uefi/protocols/udp6_service_binding_protocol.zig+2-2| ... | @@ -5,8 +5,8 @@ const Guid = uefi.Guid; | ... | @@ -5,8 +5,8 @@ const Guid = uefi.Guid; |
| 5 | const Status = uefi.Status; | 5 | const Status = uefi.Status; |
| 6 | 6 | ||
| 7 | pub const Udp6ServiceBindingProtocol = extern struct { | 7 | pub const Udp6ServiceBindingProtocol = extern struct { |
| 8 | _create_child: std.meta.FnPtr(fn (*const Udp6ServiceBindingProtocol, *?Handle) callconv(.C) Status), | 8 | _create_child: *const fn (*const Udp6ServiceBindingProtocol, *?Handle) callconv(.C) Status, |
| 9 | _destroy_child: std.meta.FnPtr(fn (*const Udp6ServiceBindingProtocol, Handle) callconv(.C) Status), | 9 | _destroy_child: *const fn (*const Udp6ServiceBindingProtocol, Handle) callconv(.C) Status, |
| 10 | 10 | ||
| 11 | pub fn createChild(self: *const Udp6ServiceBindingProtocol, handle: *?Handle) Status { | 11 | pub fn createChild(self: *const Udp6ServiceBindingProtocol, handle: *?Handle) Status { |
| 12 | return self._create_child(self, handle); | 12 | return self._create_child(self, handle); |
lib/std/os/uefi/tables/boot_services.zig+44-44| ... | @@ -22,138 +22,138 @@ pub const BootServices = extern struct { | ... | @@ -22,138 +22,138 @@ pub const BootServices = extern struct { |
| 22 | hdr: TableHeader, | 22 | hdr: TableHeader, |
| 23 | 23 | ||
| 24 | /// Raises a task's priority level and returns its previous level. | 24 | /// Raises a task's priority level and returns its previous level. |
| 25 | raiseTpl: std.meta.FnPtr(fn (new_tpl: usize) callconv(.C) usize), | 25 | raiseTpl: *const fn (new_tpl: usize) callconv(.C) usize, |
| 26 | 26 | ||
| 27 | /// Restores a task's priority level to its previous value. | 27 | /// Restores a task's priority level to its previous value. |
| 28 | restoreTpl: std.meta.FnPtr(fn (old_tpl: usize) callconv(.C) void), | 28 | restoreTpl: *const fn (old_tpl: usize) callconv(.C) void, |
| 29 | 29 | ||
| 30 | /// Allocates memory pages from the system. | 30 | /// Allocates memory pages from the system. |
| 31 | allocatePages: std.meta.FnPtr(fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(.C) Status), | 31 | allocatePages: *const fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(.C) Status, |
| 32 | 32 | ||
| 33 | /// Frees memory pages. | 33 | /// Frees memory pages. |
| 34 | freePages: std.meta.FnPtr(fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status), | 34 | freePages: *const fn (memory: [*]align(4096) u8, pages: usize) callconv(.C) Status, |
| 35 | 35 | ||
| 36 | /// Returns the current memory map. | 36 | /// Returns the current memory map. |
| 37 | getMemoryMap: std.meta.FnPtr(fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status), | 37 | getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, mapKey: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(.C) Status, |
| 38 | 38 | ||
| 39 | /// Allocates pool memory. | 39 | /// Allocates pool memory. |
| 40 | allocatePool: std.meta.FnPtr(fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status), | 40 | allocatePool: *const fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(.C) Status, |
| 41 | 41 | ||
| 42 | /// Returns pool memory to the system. | 42 | /// Returns pool memory to the system. |
| 43 | freePool: std.meta.FnPtr(fn (buffer: [*]align(8) u8) callconv(.C) Status), | 43 | freePool: *const fn (buffer: [*]align(8) u8) callconv(.C) Status, |
| 44 | 44 | ||
| 45 | /// Creates an event. | 45 | /// Creates an event. |
| 46 | createEvent: std.meta.FnPtr(fn (type: u32, notify_tpl: usize, notify_func: ?std.meta.FnPtr(fn (Event, ?*anyopaque) callconv(.C) void), notifyCtx: ?*const anyopaque, event: *Event) callconv(.C) Status), | 46 | createEvent: *const fn (type: u32, notify_tpl: usize, notify_func: ?*const fn (Event, ?*anyopaque) callconv(.C) void, notifyCtx: ?*const anyopaque, event: *Event) callconv(.C) Status, |
| 47 | 47 | ||
| 48 | /// Sets the type of timer and the trigger time for a timer event. | 48 | /// Sets the type of timer and the trigger time for a timer event. |
| 49 | setTimer: std.meta.FnPtr(fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(.C) Status), | 49 | setTimer: *const fn (event: Event, type: TimerDelay, triggerTime: u64) callconv(.C) Status, |
| 50 | 50 | ||
| 51 | /// Stops execution until an event is signaled. | 51 | /// Stops execution until an event is signaled. |
| 52 | waitForEvent: std.meta.FnPtr(fn (event_len: usize, events: [*]const Event, index: *usize) callconv(.C) Status), | 52 | waitForEvent: *const fn (event_len: usize, events: [*]const Event, index: *usize) callconv(.C) Status, |
| 53 | 53 | ||
| 54 | /// Signals an event. | 54 | /// Signals an event. |
| 55 | signalEvent: std.meta.FnPtr(fn (event: Event) callconv(.C) Status), | 55 | signalEvent: *const fn (event: Event) callconv(.C) Status, |
| 56 | 56 | ||
| 57 | /// Closes an event. | 57 | /// Closes an event. |
| 58 | closeEvent: std.meta.FnPtr(fn (event: Event) callconv(.C) Status), | 58 | closeEvent: *const fn (event: Event) callconv(.C) Status, |
| 59 | 59 | ||
| 60 | /// Checks whether an event is in the signaled state. | 60 | /// Checks whether an event is in the signaled state. |
| 61 | checkEvent: std.meta.FnPtr(fn (event: Event) callconv(.C) Status), | 61 | checkEvent: *const fn (event: Event) callconv(.C) Status, |
| 62 | 62 | ||
| 63 | /// Installs a protocol interface on a device handle. If the handle does not exist, it is created | 63 | /// Installs a protocol interface on a device handle. If the handle does not exist, it is created |
| 64 | /// and added to the list of handles in the system. installMultipleProtocolInterfaces() | 64 | /// and added to the list of handles in the system. installMultipleProtocolInterfaces() |
| 65 | /// performs more error checking than installProtocolInterface(), so its use is recommended over this. | 65 | /// performs more error checking than installProtocolInterface(), so its use is recommended over this. |
| 66 | installProtocolInterface: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(.C) Status), | 66 | installProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface_type: EfiInterfaceType, interface: *anyopaque) callconv(.C) Status, |
| 67 | 67 | ||
| 68 | /// Reinstalls a protocol interface on a device handle | 68 | /// Reinstalls a protocol interface on a device handle |
| 69 | reinstallProtocolInterface: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(.C) Status), | 69 | reinstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(.C) Status, |
| 70 | 70 | ||
| 71 | /// Removes a protocol interface from a device handle. Usage of | 71 | /// Removes a protocol interface from a device handle. Usage of |
| 72 | /// uninstallMultipleProtocolInterfaces is recommended over this. | 72 | /// uninstallMultipleProtocolInterfaces is recommended over this. |
| 73 | uninstallProtocolInterface: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(.C) Status), | 73 | uninstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(.C) Status, |
| 74 | 74 | ||
| 75 | /// Queries a handle to determine if it supports a specified protocol. | 75 | /// Queries a handle to determine if it supports a specified protocol. |
| 76 | handleProtocol: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(.C) Status), | 76 | handleProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(.C) Status, |
| 77 | 77 | ||
| 78 | reserved: *anyopaque, | 78 | reserved: *anyopaque, |
| 79 | 79 | ||
| 80 | /// Creates an event that is to be signaled whenever an interface is installed for a specified protocol. | 80 | /// Creates an event that is to be signaled whenever an interface is installed for a specified protocol. |
| 81 | registerProtocolNotify: std.meta.FnPtr(fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(.C) Status), | 81 | registerProtocolNotify: *const fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(.C) Status, |
| 82 | 82 | ||
| 83 | /// Returns an array of handles that support a specified protocol. | 83 | /// Returns an array of handles that support a specified protocol. |
| 84 | locateHandle: std.meta.FnPtr(fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(.C) Status), | 84 | locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, bufferSize: *usize, buffer: [*]Handle) callconv(.C) Status, |
| 85 | 85 | ||
| 86 | /// Locates the handle to a device on the device path that supports the specified protocol | 86 | /// Locates the handle to a device on the device path that supports the specified protocol |
| 87 | locateDevicePath: std.meta.FnPtr(fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(.C) Status), | 87 | locateDevicePath: *const fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(.C) Status, |
| 88 | 88 | ||
| 89 | /// Adds, updates, or removes a configuration table entry from the EFI System Table. | 89 | /// Adds, updates, or removes a configuration table entry from the EFI System Table. |
| 90 | installConfigurationTable: std.meta.FnPtr(fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(.C) Status), | 90 | installConfigurationTable: *const fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(.C) Status, |
| 91 | 91 | ||
| 92 | /// Loads an EFI image into memory. | 92 | /// Loads an EFI image into memory. |
| 93 | loadImage: std.meta.FnPtr(fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(.C) Status), | 93 | loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, imageHandle: *?Handle) callconv(.C) Status, |
| 94 | 94 | ||
| 95 | /// Transfers control to a loaded image's entry point. | 95 | /// Transfers control to a loaded image's entry point. |
| 96 | startImage: std.meta.FnPtr(fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(.C) Status), | 96 | startImage: *const fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(.C) Status, |
| 97 | 97 | ||
| 98 | /// Terminates a loaded EFI image and returns control to boot services. | 98 | /// Terminates a loaded EFI image and returns control to boot services. |
| 99 | exit: std.meta.FnPtr(fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(.C) Status), | 99 | exit: *const fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(.C) Status, |
| 100 | 100 | ||
| 101 | /// Unloads an image. | 101 | /// Unloads an image. |
| 102 | unloadImage: std.meta.FnPtr(fn (image_handle: Handle) callconv(.C) Status), | 102 | unloadImage: *const fn (image_handle: Handle) callconv(.C) Status, |
| 103 | 103 | ||
| 104 | /// Terminates all boot services. | 104 | /// Terminates all boot services. |
| 105 | exitBootServices: std.meta.FnPtr(fn (image_handle: Handle, map_key: usize) callconv(.C) Status), | 105 | exitBootServices: *const fn (image_handle: Handle, map_key: usize) callconv(.C) Status, |
| 106 | 106 | ||
| 107 | /// Returns a monotonically increasing count for the platform. | 107 | /// Returns a monotonically increasing count for the platform. |
| 108 | getNextMonotonicCount: std.meta.FnPtr(fn (count: *u64) callconv(.C) Status), | 108 | getNextMonotonicCount: *const fn (count: *u64) callconv(.C) Status, |
| 109 | 109 | ||
| 110 | /// Induces a fine-grained stall. | 110 | /// Induces a fine-grained stall. |
| 111 | stall: std.meta.FnPtr(fn (microseconds: usize) callconv(.C) Status), | 111 | stall: *const fn (microseconds: usize) callconv(.C) Status, |
| 112 | 112 | ||
| 113 | /// Sets the system's watchdog timer. | 113 | /// Sets the system's watchdog timer. |
| 114 | setWatchdogTimer: std.meta.FnPtr(fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(.C) Status), | 114 | setWatchdogTimer: *const fn (timeout: usize, watchdogCode: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(.C) Status, |
| 115 | 115 | ||
| 116 | /// Connects one or more drives to a controller. | 116 | /// Connects one or more drives to a controller. |
| 117 | connectController: std.meta.FnPtr(fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(.C) Status), | 117 | connectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(.C) Status, |
| 118 | 118 | ||
| 119 | // Disconnects one or more drivers from a controller | 119 | // Disconnects one or more drivers from a controller |
| 120 | disconnectController: std.meta.FnPtr(fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(.C) Status), | 120 | disconnectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(.C) Status, |
| 121 | 121 | ||
| 122 | /// Queries a handle to determine if it supports a specified protocol. | 122 | /// Queries a handle to determine if it supports a specified protocol. |
| 123 | openProtocol: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(.C) Status), | 123 | openProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(.C) Status, |
| 124 | 124 | ||
| 125 | /// Closes a protocol on a handle that was opened using openProtocol(). | 125 | /// Closes a protocol on a handle that was opened using openProtocol(). |
| 126 | closeProtocol: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(.C) Status), | 126 | closeProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, agentHandle: Handle, controller_handle: ?Handle) callconv(.C) Status, |
| 127 | 127 | ||
| 128 | /// Retrieves the list of agents that currently have a protocol interface opened. | 128 | /// Retrieves the list of agents that currently have a protocol interface opened. |
| 129 | openProtocolInformation: std.meta.FnPtr(fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(.C) Status), | 129 | openProtocolInformation: *const fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(.C) Status, |
| 130 | 130 | ||
| 131 | /// Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool. | 131 | /// Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool. |
| 132 | protocolsPerHandle: std.meta.FnPtr(fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(.C) Status), | 132 | protocolsPerHandle: *const fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(.C) Status, |
| 133 | 133 | ||
| 134 | /// Returns an array of handles that support the requested protocol in a buffer allocated from pool. | 134 | /// Returns an array of handles that support the requested protocol in a buffer allocated from pool. |
| 135 | locateHandleBuffer: std.meta.FnPtr(fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(.C) Status), | 135 | locateHandleBuffer: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(.C) Status, |
| 136 | 136 | ||
| 137 | /// Returns the first protocol instance that matches the given protocol. | 137 | /// Returns the first protocol instance that matches the given protocol. |
| 138 | locateProtocol: std.meta.FnPtr(fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(.C) Status), | 138 | locateProtocol: *const fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(.C) Status, |
| 139 | 139 | ||
| 140 | /// Installs one or more protocol interfaces into the boot services environment | 140 | /// Installs one or more protocol interfaces into the boot services environment |
| 141 | installMultipleProtocolInterfaces: std.meta.FnPtr(fn (handle: *Handle, ...) callconv(.C) Status), | 141 | installMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.C) Status, |
| 142 | 142 | ||
| 143 | /// Removes one or more protocol interfaces into the boot services environment | 143 | /// Removes one or more protocol interfaces into the boot services environment |
| 144 | uninstallMultipleProtocolInterfaces: std.meta.FnPtr(fn (handle: *Handle, ...) callconv(.C) Status), | 144 | uninstallMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.C) Status, |
| 145 | 145 | ||
| 146 | /// Computes and returns a 32-bit CRC for a data buffer. | 146 | /// Computes and returns a 32-bit CRC for a data buffer. |
| 147 | calculateCrc32: std.meta.FnPtr(fn (data: [*]const u8, data_size: usize, *u32) callconv(.C) Status), | 147 | calculateCrc32: *const fn (data: [*]const u8, data_size: usize, *u32) callconv(.C) Status, |
| 148 | 148 | ||
| 149 | /// Copies the contents of one buffer to another buffer | 149 | /// Copies the contents of one buffer to another buffer |
| 150 | copyMem: std.meta.FnPtr(fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(.C) void), | 150 | copyMem: *const fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(.C) void, |
| 151 | 151 | ||
| 152 | /// Fills a buffer with a specified value | 152 | /// Fills a buffer with a specified value |
| 153 | setMem: std.meta.FnPtr(fn (buffer: [*]u8, size: usize, value: u8) callconv(.C) void), | 153 | setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(.C) void, |
| 154 | 154 | ||
| 155 | /// Creates an event in a group. | 155 | /// Creates an event in a group. |
| 156 | createEventEx: std.meta.FnPtr(fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status), | 156 | createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EfiEventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(.C) Status, |
| 157 | 157 | ||
| 158 | /// Opens a protocol with a structure as the loaded image for a UEFI application | 158 | /// Opens a protocol with a structure as the loaded image for a UEFI application |
| 159 | pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol { | 159 | pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol { |
| ... | @@ -191,7 +191,7 @@ pub const BootServices = extern struct { | ... | @@ -191,7 +191,7 @@ pub const BootServices = extern struct { |
| 191 | pub const tpl_high_level: usize = 31; | 191 | pub const tpl_high_level: usize = 31; |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | pub const EfiEventNotify = std.meta.FnPtr(fn (event: Event, ctx: *anyopaque) callconv(.C) void); | 194 | pub const EfiEventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(.C) void; |
| 195 | 195 | ||
| 196 | pub const TimerDelay = enum(u32) { | 196 | pub const TimerDelay = enum(u32) { |
| 197 | TimerCancel, | 197 | TimerCancel, |
lib/std/os/uefi/tables/runtime_services.zig+14-14| ... | @@ -19,50 +19,50 @@ pub const RuntimeServices = extern struct { | ... | @@ -19,50 +19,50 @@ pub const RuntimeServices = extern struct { |
| 19 | hdr: TableHeader, | 19 | hdr: TableHeader, |
| 20 | 20 | ||
| 21 | /// Returns the current time and date information, and the time-keeping capabilities of the hardware platform. | 21 | /// Returns the current time and date information, and the time-keeping capabilities of the hardware platform. |
| 22 | getTime: std.meta.FnPtr(fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(.C) Status), | 22 | getTime: *const fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(.C) Status, |
| 23 | 23 | ||
| 24 | /// Sets the current local time and date information | 24 | /// Sets the current local time and date information |
| 25 | setTime: std.meta.FnPtr(fn (time: *uefi.Time) callconv(.C) Status), | 25 | setTime: *const fn (time: *uefi.Time) callconv(.C) Status, |
| 26 | 26 | ||
| 27 | /// Returns the current wakeup alarm clock setting | 27 | /// Returns the current wakeup alarm clock setting |
| 28 | getWakeupTime: std.meta.FnPtr(fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(.C) Status), | 28 | getWakeupTime: *const fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(.C) Status, |
| 29 | 29 | ||
| 30 | /// Sets the system wakeup alarm clock time | 30 | /// Sets the system wakeup alarm clock time |
| 31 | setWakeupTime: std.meta.FnPtr(fn (enable: *bool, time: ?*uefi.Time) callconv(.C) Status), | 31 | setWakeupTime: *const fn (enable: *bool, time: ?*uefi.Time) callconv(.C) Status, |
| 32 | 32 | ||
| 33 | /// Changes the runtime addressing mode of EFI firmware from physical to virtual. | 33 | /// Changes the runtime addressing mode of EFI firmware from physical to virtual. |
| 34 | setVirtualAddressMap: std.meta.FnPtr(fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(.C) Status), | 34 | setVirtualAddressMap: *const fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(.C) Status, |
| 35 | 35 | ||
| 36 | /// Determines the new virtual address that is to be used on subsequent memory accesses. | 36 | /// Determines the new virtual address that is to be used on subsequent memory accesses. |
| 37 | convertPointer: std.meta.FnPtr(fn (debug_disposition: usize, address: **anyopaque) callconv(.C) Status), | 37 | convertPointer: *const fn (debug_disposition: usize, address: **anyopaque) callconv(.C) Status, |
| 38 | 38 | ||
| 39 | /// Returns the value of a variable. | 39 | /// Returns the value of a variable. |
| 40 | getVariable: std.meta.FnPtr(fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(.C) Status), | 40 | getVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(.C) Status, |
| 41 | 41 | ||
| 42 | /// Enumerates the current variable names. | 42 | /// Enumerates the current variable names. |
| 43 | getNextVariableName: std.meta.FnPtr(fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(.C) Status), | 43 | getNextVariableName: *const fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(.C) Status, |
| 44 | 44 | ||
| 45 | /// Sets the value of a variable. | 45 | /// Sets the value of a variable. |
| 46 | setVariable: std.meta.FnPtr(fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(.C) Status), | 46 | setVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(.C) Status, |
| 47 | 47 | ||
| 48 | /// Return the next high 32 bits of the platform's monotonic counter | 48 | /// Return the next high 32 bits of the platform's monotonic counter |
| 49 | getNextHighMonotonicCount: std.meta.FnPtr(fn (high_count: *u32) callconv(.C) Status), | 49 | getNextHighMonotonicCount: *const fn (high_count: *u32) callconv(.C) Status, |
| 50 | 50 | ||
| 51 | /// Resets the entire platform. | 51 | /// Resets the entire platform. |
| 52 | resetSystem: std.meta.FnPtr(fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(.C) noreturn), | 52 | resetSystem: *const fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(.C) noreturn, |
| 53 | 53 | ||
| 54 | /// Passes capsules to the firmware with both virtual and physical mapping. | 54 | /// Passes capsules to the firmware with both virtual and physical mapping. |
| 55 | /// Depending on the intended consumption, the firmware may process the capsule immediately. | 55 | /// Depending on the intended consumption, the firmware may process the capsule immediately. |
| 56 | /// If the payload should persist across a system reset, the reset value returned from | 56 | /// If the payload should persist across a system reset, the reset value returned from |
| 57 | /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule | 57 | /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule |
| 58 | /// to be processed by the firmware as part of the reset process. | 58 | /// to be processed by the firmware as part of the reset process. |
| 59 | updateCapsule: std.meta.FnPtr(fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(.C) Status), | 59 | updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: EfiPhysicalAddress) callconv(.C) Status, |
| 60 | 60 | ||
| 61 | /// Returns if the capsule can be supported via `updateCapsule` | 61 | /// Returns if the capsule can be supported via `updateCapsule` |
| 62 | queryCapsuleCapabilities: std.meta.FnPtr(fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(.C) Status), | 62 | queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, resetType: ResetType) callconv(.C) Status, |
| 63 | 63 | ||
| 64 | /// Returns information about the EFI variables | 64 | /// Returns information about the EFI variables |
| 65 | queryVariableInfo: std.meta.FnPtr(fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(.C) Status), | 65 | queryVariableInfo: *const fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(.C) Status, |
| 66 | 66 | ||
| 67 | pub const signature: u64 = 0x56524553544e5552; | 67 | pub const signature: u64 = 0x56524553544e5552; |
| 68 | }; | 68 | }; |
lib/std/os/windows.zig+12-12| ... | @@ -2696,7 +2696,7 @@ pub const MEM_RESERVE_PLACEHOLDERS = 0x2; | ... | @@ -2696,7 +2696,7 @@ pub const MEM_RESERVE_PLACEHOLDERS = 0x2; |
| 2696 | pub const MEM_DECOMMIT = 0x4000; | 2696 | pub const MEM_DECOMMIT = 0x4000; |
| 2697 | pub const MEM_RELEASE = 0x8000; | 2697 | pub const MEM_RELEASE = 0x8000; |
| 2698 | 2698 | ||
| 2699 | pub const PTHREAD_START_ROUTINE = std.meta.FnPtr(fn (LPVOID) callconv(.C) DWORD); | 2699 | pub const PTHREAD_START_ROUTINE = *const fn (LPVOID) callconv(.C) DWORD; |
| 2700 | pub const LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE; | 2700 | pub const LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE; |
| 2701 | 2701 | ||
| 2702 | pub const WIN32_FIND_DATAW = extern struct { | 2702 | pub const WIN32_FIND_DATAW = extern struct { |
| ... | @@ -2869,7 +2869,7 @@ pub const IMAGE_TLS_DIRECTORY = extern struct { | ... | @@ -2869,7 +2869,7 @@ pub const IMAGE_TLS_DIRECTORY = extern struct { |
| 2869 | pub const IMAGE_TLS_DIRECTORY64 = IMAGE_TLS_DIRECTORY; | 2869 | pub const IMAGE_TLS_DIRECTORY64 = IMAGE_TLS_DIRECTORY; |
| 2870 | pub const IMAGE_TLS_DIRECTORY32 = IMAGE_TLS_DIRECTORY; | 2870 | pub const IMAGE_TLS_DIRECTORY32 = IMAGE_TLS_DIRECTORY; |
| 2871 | 2871 | ||
| 2872 | pub const PIMAGE_TLS_CALLBACK = ?std.meta.FnPtr(fn (PVOID, DWORD, PVOID) callconv(.C) void); | 2872 | pub const PIMAGE_TLS_CALLBACK = ?*const fn (PVOID, DWORD, PVOID) callconv(.C) void; |
| 2873 | 2873 | ||
| 2874 | pub const PROV_RSA_FULL = 1; | 2874 | pub const PROV_RSA_FULL = 1; |
| 2875 | 2875 | ||
| ... | @@ -2922,14 +2922,14 @@ pub const RTL_QUERY_REGISTRY_TABLE = extern struct { | ... | @@ -2922,14 +2922,14 @@ pub const RTL_QUERY_REGISTRY_TABLE = extern struct { |
| 2922 | DefaultLength: ULONG, | 2922 | DefaultLength: ULONG, |
| 2923 | }; | 2923 | }; |
| 2924 | 2924 | ||
| 2925 | pub const RTL_QUERY_REGISTRY_ROUTINE = ?std.meta.FnPtr(fn ( | 2925 | pub const RTL_QUERY_REGISTRY_ROUTINE = ?*const fn ( |
| 2926 | PWSTR, | 2926 | PWSTR, |
| 2927 | ULONG, | 2927 | ULONG, |
| 2928 | ?*anyopaque, | 2928 | ?*anyopaque, |
| 2929 | ULONG, | 2929 | ULONG, |
| 2930 | ?*anyopaque, | 2930 | ?*anyopaque, |
| 2931 | ?*anyopaque, | 2931 | ?*anyopaque, |
| 2932 | ) callconv(WINAPI) NTSTATUS); | 2932 | ) callconv(WINAPI) NTSTATUS; |
| 2933 | 2933 | ||
| 2934 | /// Path is a full path | 2934 | /// Path is a full path |
| 2935 | pub const RTL_REGISTRY_ABSOLUTE = 0; | 2935 | pub const RTL_REGISTRY_ABSOLUTE = 0; |
| ... | @@ -3026,7 +3026,7 @@ pub const FILE_ACTION_MODIFIED = 0x00000003; | ... | @@ -3026,7 +3026,7 @@ pub const FILE_ACTION_MODIFIED = 0x00000003; |
| 3026 | pub const FILE_ACTION_RENAMED_OLD_NAME = 0x00000004; | 3026 | pub const FILE_ACTION_RENAMED_OLD_NAME = 0x00000004; |
| 3027 | pub const FILE_ACTION_RENAMED_NEW_NAME = 0x00000005; | 3027 | pub const FILE_ACTION_RENAMED_NEW_NAME = 0x00000005; |
| 3028 | 3028 | ||
| 3029 | pub const LPOVERLAPPED_COMPLETION_ROUTINE = ?std.meta.FnPtr(fn (DWORD, DWORD, *OVERLAPPED) callconv(.C) void); | 3029 | pub const LPOVERLAPPED_COMPLETION_ROUTINE = ?*const fn (DWORD, DWORD, *OVERLAPPED) callconv(.C) void; |
| 3030 | 3030 | ||
| 3031 | pub const FILE_NOTIFY_CHANGE_CREATION = 64; | 3031 | pub const FILE_NOTIFY_CHANGE_CREATION = 64; |
| 3032 | pub const FILE_NOTIFY_CHANGE_SIZE = 8; | 3032 | pub const FILE_NOTIFY_CHANGE_SIZE = 8; |
| ... | @@ -3079,7 +3079,7 @@ pub const RTL_CRITICAL_SECTION = extern struct { | ... | @@ -3079,7 +3079,7 @@ pub const RTL_CRITICAL_SECTION = extern struct { |
| 3079 | pub const CRITICAL_SECTION = RTL_CRITICAL_SECTION; | 3079 | pub const CRITICAL_SECTION = RTL_CRITICAL_SECTION; |
| 3080 | pub const INIT_ONCE = RTL_RUN_ONCE; | 3080 | pub const INIT_ONCE = RTL_RUN_ONCE; |
| 3081 | pub const INIT_ONCE_STATIC_INIT = RTL_RUN_ONCE_INIT; | 3081 | pub const INIT_ONCE_STATIC_INIT = RTL_RUN_ONCE_INIT; |
| 3082 | pub const INIT_ONCE_FN = std.meta.FnPtr(fn (InitOnce: *INIT_ONCE, Parameter: ?*anyopaque, Context: ?*anyopaque) callconv(.C) BOOL); | 3082 | pub const INIT_ONCE_FN = *const fn (InitOnce: *INIT_ONCE, Parameter: ?*anyopaque, Context: ?*anyopaque) callconv(.C) BOOL; |
| 3083 | 3083 | ||
| 3084 | pub const RTL_RUN_ONCE = extern struct { | 3084 | pub const RTL_RUN_ONCE = extern struct { |
| 3085 | Ptr: ?*anyopaque, | 3085 | Ptr: ?*anyopaque, |
| ... | @@ -3382,7 +3382,7 @@ pub const EXCEPTION_POINTERS = extern struct { | ... | @@ -3382,7 +3382,7 @@ pub const EXCEPTION_POINTERS = extern struct { |
| 3382 | ContextRecord: *std.os.windows.CONTEXT, | 3382 | ContextRecord: *std.os.windows.CONTEXT, |
| 3383 | }; | 3383 | }; |
| 3384 | 3384 | ||
| 3385 | pub const VECTORED_EXCEPTION_HANDLER = std.meta.FnPtr(fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(WINAPI) c_long); | 3385 | pub const VECTORED_EXCEPTION_HANDLER = *const fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(WINAPI) c_long; |
| 3386 | 3386 | ||
| 3387 | pub const OBJECT_ATTRIBUTES = extern struct { | 3387 | pub const OBJECT_ATTRIBUTES = extern struct { |
| 3388 | Length: ULONG, | 3388 | Length: ULONG, |
| ... | @@ -3658,7 +3658,7 @@ pub const RTL_DRIVE_LETTER_CURDIR = extern struct { | ... | @@ -3658,7 +3658,7 @@ pub const RTL_DRIVE_LETTER_CURDIR = extern struct { |
| 3658 | DosPath: UNICODE_STRING, | 3658 | DosPath: UNICODE_STRING, |
| 3659 | }; | 3659 | }; |
| 3660 | 3660 | ||
| 3661 | pub const PPS_POST_PROCESS_INIT_ROUTINE = ?std.meta.FnPtr(fn () callconv(.C) void); | 3661 | pub const PPS_POST_PROCESS_INIT_ROUTINE = ?*const fn () callconv(.C) void; |
| 3662 | 3662 | ||
| 3663 | pub const FILE_BOTH_DIR_INFORMATION = extern struct { | 3663 | pub const FILE_BOTH_DIR_INFORMATION = extern struct { |
| 3664 | NextEntryOffset: ULONG, | 3664 | NextEntryOffset: ULONG, |
| ... | @@ -3678,7 +3678,7 @@ pub const FILE_BOTH_DIR_INFORMATION = extern struct { | ... | @@ -3678,7 +3678,7 @@ pub const FILE_BOTH_DIR_INFORMATION = extern struct { |
| 3678 | }; | 3678 | }; |
| 3679 | pub const FILE_BOTH_DIRECTORY_INFORMATION = FILE_BOTH_DIR_INFORMATION; | 3679 | pub const FILE_BOTH_DIRECTORY_INFORMATION = FILE_BOTH_DIR_INFORMATION; |
| 3680 | 3680 | ||
| 3681 | pub const IO_APC_ROUTINE = std.meta.FnPtr(fn (PVOID, *IO_STATUS_BLOCK, ULONG) callconv(.C) void); | 3681 | pub const IO_APC_ROUTINE = *const fn (PVOID, *IO_STATUS_BLOCK, ULONG) callconv(.C) void; |
| 3682 | 3682 | ||
| 3683 | pub const CURDIR = extern struct { | 3683 | pub const CURDIR = extern struct { |
| 3684 | DosPath: UNICODE_STRING, | 3684 | DosPath: UNICODE_STRING, |
| ... | @@ -3750,8 +3750,8 @@ pub const ENUM_PAGE_FILE_INFORMATION = extern struct { | ... | @@ -3750,8 +3750,8 @@ pub const ENUM_PAGE_FILE_INFORMATION = extern struct { |
| 3750 | PeakUsage: SIZE_T, | 3750 | PeakUsage: SIZE_T, |
| 3751 | }; | 3751 | }; |
| 3752 | 3752 | ||
| 3753 | pub const PENUM_PAGE_FILE_CALLBACKW = ?std.meta.FnPtr(fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCWSTR) callconv(.C) BOOL); | 3753 | pub const PENUM_PAGE_FILE_CALLBACKW = ?*const fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCWSTR) callconv(.C) BOOL; |
| 3754 | pub const PENUM_PAGE_FILE_CALLBACKA = ?std.meta.FnPtr(fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCSTR) callconv(.C) BOOL); | 3754 | pub const PENUM_PAGE_FILE_CALLBACKA = ?*const fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCSTR) callconv(.C) BOOL; |
| 3755 | 3755 | ||
| 3756 | pub const PSAPI_WS_WATCH_INFORMATION_EX = extern struct { | 3756 | pub const PSAPI_WS_WATCH_INFORMATION_EX = extern struct { |
| 3757 | BasicInfo: PSAPI_WS_WATCH_INFORMATION, | 3757 | BasicInfo: PSAPI_WS_WATCH_INFORMATION, |
| ... | @@ -3851,7 +3851,7 @@ pub const CTRL_CLOSE_EVENT: DWORD = 2; | ... | @@ -3851,7 +3851,7 @@ pub const CTRL_CLOSE_EVENT: DWORD = 2; |
| 3851 | pub const CTRL_LOGOFF_EVENT: DWORD = 5; | 3851 | pub const CTRL_LOGOFF_EVENT: DWORD = 5; |
| 3852 | pub const CTRL_SHUTDOWN_EVENT: DWORD = 6; | 3852 | pub const CTRL_SHUTDOWN_EVENT: DWORD = 6; |
| 3853 | 3853 | ||
| 3854 | pub const HANDLER_ROUTINE = std.meta.FnPtr(fn (dwCtrlType: DWORD) callconv(WINAPI) BOOL); | 3854 | pub const HANDLER_ROUTINE = *const fn (dwCtrlType: DWORD) callconv(WINAPI) BOOL; |
| 3855 | 3855 | ||
| 3856 | /// Processor feature enumeration. | 3856 | /// Processor feature enumeration. |
| 3857 | pub const PF = enum(DWORD) { | 3857 | pub const PF = enum(DWORD) { |
lib/std/os/windows/user32.zig+13-13| ... | @@ -39,7 +39,7 @@ fn selectSymbol(comptime function_static: anytype, function_dynamic: @TypeOf(fun | ... | @@ -39,7 +39,7 @@ fn selectSymbol(comptime function_static: anytype, function_dynamic: @TypeOf(fun |
| 39 | 39 | ||
| 40 | // === Messages === | 40 | // === Messages === |
| 41 | 41 | ||
| 42 | pub const WNDPROC = std.meta.FnPtr(fn (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM) callconv(WINAPI) LRESULT); | 42 | pub const WNDPROC = *const fn (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM) callconv(WINAPI) LRESULT; |
| 43 | 43 | ||
| 44 | pub const MSG = extern struct { | 44 | pub const MSG = extern struct { |
| 45 | hWnd: ?HWND, | 45 | hWnd: ?HWND, |
| ... | @@ -1056,7 +1056,7 @@ pub fn getMessageA(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: | ... | @@ -1056,7 +1056,7 @@ pub fn getMessageA(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: |
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | pub extern "user32" fn GetMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT) callconv(WINAPI) BOOL; | 1058 | pub extern "user32" fn GetMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT) callconv(WINAPI) BOOL; |
| 1059 | pub var pfnGetMessageW: std.meta.FnPtr(@TypeOf(GetMessageW)) = undefined; | 1059 | pub var pfnGetMessageW: *const @TypeOf(GetMessageW) = undefined; |
| 1060 | pub fn getMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: u32) !void { | 1060 | pub fn getMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: u32) !void { |
| 1061 | const function = selectSymbol(GetMessageW, pfnGetMessageW, .win2k); | 1061 | const function = selectSymbol(GetMessageW, pfnGetMessageW, .win2k); |
| 1062 | 1062 | ||
| ... | @@ -1087,7 +1087,7 @@ pub fn peekMessageA(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: | ... | @@ -1087,7 +1087,7 @@ pub fn peekMessageA(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: |
| 1087 | } | 1087 | } |
| 1088 | 1088 | ||
| 1089 | pub extern "user32" fn PeekMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMsg: UINT) callconv(WINAPI) BOOL; | 1089 | pub extern "user32" fn PeekMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMsg: UINT) callconv(WINAPI) BOOL; |
| 1090 | pub var pfnPeekMessageW: std.meta.FnPtr(@TypeOf(PeekMessageW)) = undefined; | 1090 | pub var pfnPeekMessageW: *const @TypeOf(PeekMessageW) = undefined; |
| 1091 | pub fn peekMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: u32, wRemoveMsg: u32) !bool { | 1091 | pub fn peekMessageW(lpMsg: *MSG, hWnd: ?HWND, wMsgFilterMin: u32, wMsgFilterMax: u32, wRemoveMsg: u32) !bool { |
| 1092 | const function = selectSymbol(PeekMessageW, pfnPeekMessageW, .win2k); | 1092 | const function = selectSymbol(PeekMessageW, pfnPeekMessageW, .win2k); |
| 1093 | 1093 | ||
| ... | @@ -1112,7 +1112,7 @@ pub fn dispatchMessageA(lpMsg: *const MSG) LRESULT { | ... | @@ -1112,7 +1112,7 @@ pub fn dispatchMessageA(lpMsg: *const MSG) LRESULT { |
| 1112 | } | 1112 | } |
| 1113 | 1113 | ||
| 1114 | pub extern "user32" fn DispatchMessageW(lpMsg: *const MSG) callconv(WINAPI) LRESULT; | 1114 | pub extern "user32" fn DispatchMessageW(lpMsg: *const MSG) callconv(WINAPI) LRESULT; |
| 1115 | pub var pfnDispatchMessageW: std.meta.FnPtr(@TypeOf(DispatchMessageW)) = undefined; | 1115 | pub var pfnDispatchMessageW: *const @TypeOf(DispatchMessageW) = undefined; |
| 1116 | pub fn dispatchMessageW(lpMsg: *const MSG) LRESULT { | 1116 | pub fn dispatchMessageW(lpMsg: *const MSG) LRESULT { |
| 1117 | const function = selectSymbol(DispatchMessageW, pfnDispatchMessageW, .win2k); | 1117 | const function = selectSymbol(DispatchMessageW, pfnDispatchMessageW, .win2k); |
| 1118 | return function(lpMsg); | 1118 | return function(lpMsg); |
| ... | @@ -1129,7 +1129,7 @@ pub fn defWindowProcA(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) LRE | ... | @@ -1129,7 +1129,7 @@ pub fn defWindowProcA(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) LRE |
| 1129 | } | 1129 | } |
| 1130 | 1130 | ||
| 1131 | pub extern "user32" fn DefWindowProcW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) callconv(WINAPI) LRESULT; | 1131 | pub extern "user32" fn DefWindowProcW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) callconv(WINAPI) LRESULT; |
| 1132 | pub var pfnDefWindowProcW: std.meta.FnPtr(@TypeOf(DefWindowProcW)) = undefined; | 1132 | pub var pfnDefWindowProcW: *const @TypeOf(DefWindowProcW) = undefined; |
| 1133 | pub fn defWindowProcW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) LRESULT { | 1133 | pub fn defWindowProcW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) LRESULT { |
| 1134 | const function = selectSymbol(DefWindowProcW, pfnDefWindowProcW, .win2k); | 1134 | const function = selectSymbol(DefWindowProcW, pfnDefWindowProcW, .win2k); |
| 1135 | return function(hWnd, Msg, wParam, lParam); | 1135 | return function(hWnd, Msg, wParam, lParam); |
| ... | @@ -1191,7 +1191,7 @@ pub fn registerClassExA(window_class: *const WNDCLASSEXA) !ATOM { | ... | @@ -1191,7 +1191,7 @@ pub fn registerClassExA(window_class: *const WNDCLASSEXA) !ATOM { |
| 1191 | } | 1191 | } |
| 1192 | 1192 | ||
| 1193 | pub extern "user32" fn RegisterClassExW(*const WNDCLASSEXW) callconv(WINAPI) ATOM; | 1193 | pub extern "user32" fn RegisterClassExW(*const WNDCLASSEXW) callconv(WINAPI) ATOM; |
| 1194 | pub var pfnRegisterClassExW: std.meta.FnPtr(@TypeOf(RegisterClassExW)) = undefined; | 1194 | pub var pfnRegisterClassExW: *const @TypeOf(RegisterClassExW) = undefined; |
| 1195 | pub fn registerClassExW(window_class: *const WNDCLASSEXW) !ATOM { | 1195 | pub fn registerClassExW(window_class: *const WNDCLASSEXW) !ATOM { |
| 1196 | const function = selectSymbol(RegisterClassExW, pfnRegisterClassExW, .win2k); | 1196 | const function = selectSymbol(RegisterClassExW, pfnRegisterClassExW, .win2k); |
| 1197 | const atom = function(window_class); | 1197 | const atom = function(window_class); |
| ... | @@ -1215,7 +1215,7 @@ pub fn unregisterClassA(lpClassName: [*:0]const u8, hInstance: HINSTANCE) !void | ... | @@ -1215,7 +1215,7 @@ pub fn unregisterClassA(lpClassName: [*:0]const u8, hInstance: HINSTANCE) !void |
| 1215 | } | 1215 | } |
| 1216 | 1216 | ||
| 1217 | pub extern "user32" fn UnregisterClassW(lpClassName: [*:0]const u16, hInstance: HINSTANCE) callconv(WINAPI) BOOL; | 1217 | pub extern "user32" fn UnregisterClassW(lpClassName: [*:0]const u16, hInstance: HINSTANCE) callconv(WINAPI) BOOL; |
| 1218 | pub var pfnUnregisterClassW: std.meta.FnPtr(@TypeOf(UnregisterClassW)) = undefined; | 1218 | pub var pfnUnregisterClassW: *const @TypeOf(UnregisterClassW) = undefined; |
| 1219 | pub fn unregisterClassW(lpClassName: [*:0]const u16, hInstance: HINSTANCE) !void { | 1219 | pub fn unregisterClassW(lpClassName: [*:0]const u16, hInstance: HINSTANCE) !void { |
| 1220 | const function = selectSymbol(UnregisterClassW, pfnUnregisterClassW, .win2k); | 1220 | const function = selectSymbol(UnregisterClassW, pfnUnregisterClassW, .win2k); |
| 1221 | if (function(lpClassName, hInstance) == 0) { | 1221 | if (function(lpClassName, hInstance) == 0) { |
| ... | @@ -1292,7 +1292,7 @@ pub fn createWindowExA(dwExStyle: u32, lpClassName: [*:0]const u8, lpWindowName: | ... | @@ -1292,7 +1292,7 @@ pub fn createWindowExA(dwExStyle: u32, lpClassName: [*:0]const u8, lpWindowName: |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | pub extern "user32" fn CreateWindowExW(dwExStyle: DWORD, lpClassName: [*:0]const u16, lpWindowName: [*:0]const u16, dwStyle: DWORD, X: i32, Y: i32, nWidth: i32, nHeight: i32, hWindParent: ?HWND, hMenu: ?HMENU, hInstance: HINSTANCE, lpParam: ?LPVOID) callconv(WINAPI) ?HWND; | 1294 | pub extern "user32" fn CreateWindowExW(dwExStyle: DWORD, lpClassName: [*:0]const u16, lpWindowName: [*:0]const u16, dwStyle: DWORD, X: i32, Y: i32, nWidth: i32, nHeight: i32, hWindParent: ?HWND, hMenu: ?HMENU, hInstance: HINSTANCE, lpParam: ?LPVOID) callconv(WINAPI) ?HWND; |
| 1295 | pub var pfnCreateWindowExW: std.meta.FnPtr(@TypeOf(CreateWindowExW)) = undefined; | 1295 | pub var pfnCreateWindowExW: *const @TypeOf(CreateWindowExW) = undefined; |
| 1296 | pub fn createWindowExW(dwExStyle: u32, lpClassName: [*:0]const u16, lpWindowName: [*:0]const u16, dwStyle: u32, X: i32, Y: i32, nWidth: i32, nHeight: i32, hWindParent: ?HWND, hMenu: ?HMENU, hInstance: HINSTANCE, lpParam: ?*anyopaque) !HWND { | 1296 | pub fn createWindowExW(dwExStyle: u32, lpClassName: [*:0]const u16, lpWindowName: [*:0]const u16, dwStyle: u32, X: i32, Y: i32, nWidth: i32, nHeight: i32, hWindParent: ?HWND, hMenu: ?HMENU, hInstance: HINSTANCE, lpParam: ?*anyopaque) !HWND { |
| 1297 | const function = selectSymbol(CreateWindowExW, pfnCreateWindowExW, .win2k); | 1297 | const function = selectSymbol(CreateWindowExW, pfnCreateWindowExW, .win2k); |
| 1298 | const window = function(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWindParent, hMenu, hInstance, lpParam); | 1298 | const window = function(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWindParent, hMenu, hInstance, lpParam); |
| ... | @@ -1382,7 +1382,7 @@ pub fn getWindowLongA(hWnd: HWND, nIndex: i32) !i32 { | ... | @@ -1382,7 +1382,7 @@ pub fn getWindowLongA(hWnd: HWND, nIndex: i32) !i32 { |
| 1382 | } | 1382 | } |
| 1383 | 1383 | ||
| 1384 | pub extern "user32" fn GetWindowLongW(hWnd: HWND, nIndex: i32) callconv(WINAPI) LONG; | 1384 | pub extern "user32" fn GetWindowLongW(hWnd: HWND, nIndex: i32) callconv(WINAPI) LONG; |
| 1385 | pub var pfnGetWindowLongW: std.meta.FnPtr(@TypeOf(GetWindowLongW)) = undefined; | 1385 | pub var pfnGetWindowLongW: *const @TypeOf(GetWindowLongW) = undefined; |
| 1386 | pub fn getWindowLongW(hWnd: HWND, nIndex: i32) !i32 { | 1386 | pub fn getWindowLongW(hWnd: HWND, nIndex: i32) !i32 { |
| 1387 | const function = selectSymbol(GetWindowLongW, pfnGetWindowLongW, .win2k); | 1387 | const function = selectSymbol(GetWindowLongW, pfnGetWindowLongW, .win2k); |
| 1388 | 1388 | ||
| ... | @@ -1415,7 +1415,7 @@ pub fn getWindowLongPtrA(hWnd: HWND, nIndex: i32) !isize { | ... | @@ -1415,7 +1415,7 @@ pub fn getWindowLongPtrA(hWnd: HWND, nIndex: i32) !isize { |
| 1415 | } | 1415 | } |
| 1416 | 1416 | ||
| 1417 | pub extern "user32" fn GetWindowLongPtrW(hWnd: HWND, nIndex: i32) callconv(WINAPI) LONG_PTR; | 1417 | pub extern "user32" fn GetWindowLongPtrW(hWnd: HWND, nIndex: i32) callconv(WINAPI) LONG_PTR; |
| 1418 | pub var pfnGetWindowLongPtrW: std.meta.FnPtr(@TypeOf(GetWindowLongPtrW)) = undefined; | 1418 | pub var pfnGetWindowLongPtrW: *const @TypeOf(GetWindowLongPtrW) = undefined; |
| 1419 | pub fn getWindowLongPtrW(hWnd: HWND, nIndex: i32) !isize { | 1419 | pub fn getWindowLongPtrW(hWnd: HWND, nIndex: i32) !isize { |
| 1420 | if (@sizeOf(LONG_PTR) == 4) return getWindowLongW(hWnd, nIndex); | 1420 | if (@sizeOf(LONG_PTR) == 4) return getWindowLongW(hWnd, nIndex); |
| 1421 | const function = selectSymbol(GetWindowLongPtrW, pfnGetWindowLongPtrW, .win2k); | 1421 | const function = selectSymbol(GetWindowLongPtrW, pfnGetWindowLongPtrW, .win2k); |
| ... | @@ -1449,7 +1449,7 @@ pub fn setWindowLongA(hWnd: HWND, nIndex: i32, dwNewLong: i32) !i32 { | ... | @@ -1449,7 +1449,7 @@ pub fn setWindowLongA(hWnd: HWND, nIndex: i32, dwNewLong: i32) !i32 { |
| 1449 | } | 1449 | } |
| 1450 | 1450 | ||
| 1451 | pub extern "user32" fn SetWindowLongW(hWnd: HWND, nIndex: i32, dwNewLong: LONG) callconv(WINAPI) LONG; | 1451 | pub extern "user32" fn SetWindowLongW(hWnd: HWND, nIndex: i32, dwNewLong: LONG) callconv(WINAPI) LONG; |
| 1452 | pub var pfnSetWindowLongW: std.meta.FnPtr(@TypeOf(SetWindowLongW)) = undefined; | 1452 | pub var pfnSetWindowLongW: *const @TypeOf(SetWindowLongW) = undefined; |
| 1453 | pub fn setWindowLongW(hWnd: HWND, nIndex: i32, dwNewLong: i32) !i32 { | 1453 | pub fn setWindowLongW(hWnd: HWND, nIndex: i32, dwNewLong: i32) !i32 { |
| 1454 | const function = selectSymbol(SetWindowLongW, pfnSetWindowLongW, .win2k); | 1454 | const function = selectSymbol(SetWindowLongW, pfnSetWindowLongW, .win2k); |
| 1455 | 1455 | ||
| ... | @@ -1484,7 +1484,7 @@ pub fn setWindowLongPtrA(hWnd: HWND, nIndex: i32, dwNewLong: isize) !isize { | ... | @@ -1484,7 +1484,7 @@ pub fn setWindowLongPtrA(hWnd: HWND, nIndex: i32, dwNewLong: isize) !isize { |
| 1484 | } | 1484 | } |
| 1485 | 1485 | ||
| 1486 | pub extern "user32" fn SetWindowLongPtrW(hWnd: HWND, nIndex: i32, dwNewLong: LONG_PTR) callconv(WINAPI) LONG_PTR; | 1486 | pub extern "user32" fn SetWindowLongPtrW(hWnd: HWND, nIndex: i32, dwNewLong: LONG_PTR) callconv(WINAPI) LONG_PTR; |
| 1487 | pub var pfnSetWindowLongPtrW: std.meta.FnPtr(@TypeOf(SetWindowLongPtrW)) = undefined; | 1487 | pub var pfnSetWindowLongPtrW: *const @TypeOf(SetWindowLongPtrW) = undefined; |
| 1488 | pub fn setWindowLongPtrW(hWnd: HWND, nIndex: i32, dwNewLong: isize) !isize { | 1488 | pub fn setWindowLongPtrW(hWnd: HWND, nIndex: i32, dwNewLong: isize) !isize { |
| 1489 | if (@sizeOf(LONG_PTR) == 4) return setWindowLongW(hWnd, nIndex, dwNewLong); | 1489 | if (@sizeOf(LONG_PTR) == 4) return setWindowLongW(hWnd, nIndex, dwNewLong); |
| 1490 | const function = selectSymbol(SetWindowLongPtrW, pfnSetWindowLongPtrW, .win2k); | 1490 | const function = selectSymbol(SetWindowLongPtrW, pfnSetWindowLongPtrW, .win2k); |
| ... | @@ -1580,7 +1580,7 @@ pub fn messageBoxA(hWnd: ?HWND, lpText: [*:0]const u8, lpCaption: [*:0]const u8, | ... | @@ -1580,7 +1580,7 @@ pub fn messageBoxA(hWnd: ?HWND, lpText: [*:0]const u8, lpCaption: [*:0]const u8, |
| 1580 | } | 1580 | } |
| 1581 | 1581 | ||
| 1582 | pub extern "user32" fn MessageBoxW(hWnd: ?HWND, lpText: [*:0]const u16, lpCaption: ?[*:0]const u16, uType: UINT) callconv(WINAPI) i32; | 1582 | pub extern "user32" fn MessageBoxW(hWnd: ?HWND, lpText: [*:0]const u16, lpCaption: ?[*:0]const u16, uType: UINT) callconv(WINAPI) i32; |
| 1583 | pub var pfnMessageBoxW: std.meta.FnPtr(@TypeOf(MessageBoxW)) = undefined; | 1583 | pub var pfnMessageBoxW: *const @TypeOf(MessageBoxW) = undefined; |
| 1584 | pub fn messageBoxW(hWnd: ?HWND, lpText: [*:0]const u16, lpCaption: [*:0]const u16, uType: u32) !i32 { | 1584 | pub fn messageBoxW(hWnd: ?HWND, lpText: [*:0]const u16, lpCaption: [*:0]const u16, uType: u32) !i32 { |
| 1585 | const function = selectSymbol(MessageBoxW, pfnMessageBoxW, .win2k); | 1585 | const function = selectSymbol(MessageBoxW, pfnMessageBoxW, .win2k); |
| 1586 | const value = function(hWnd, lpText, lpCaption, uType); | 1586 | const value = function(hWnd, lpText, lpCaption, uType); |
lib/std/os/windows/ws2_32.zig+18-18| ... | @@ -942,7 +942,7 @@ pub const UDP_NOCHECKSUM = 1; | ... | @@ -942,7 +942,7 @@ pub const UDP_NOCHECKSUM = 1; |
| 942 | pub const UDP_CHECKSUM_COVERAGE = 20; | 942 | pub const UDP_CHECKSUM_COVERAGE = 20; |
| 943 | pub const GAI_STRERROR_BUFFER_SIZE = 1024; | 943 | pub const GAI_STRERROR_BUFFER_SIZE = 1024; |
| 944 | 944 | ||
| 945 | pub const LPCONDITIONPROC = std.meta.FnPtr(fn ( | 945 | pub const LPCONDITIONPROC = *const fn ( |
| 946 | lpCallerId: *WSABUF, | 946 | lpCallerId: *WSABUF, |
| 947 | lpCallerData: *WSABUF, | 947 | lpCallerData: *WSABUF, |
| 948 | lpSQOS: *QOS, | 948 | lpSQOS: *QOS, |
| ... | @@ -951,14 +951,14 @@ pub const LPCONDITIONPROC = std.meta.FnPtr(fn ( | ... | @@ -951,14 +951,14 @@ pub const LPCONDITIONPROC = std.meta.FnPtr(fn ( |
| 951 | lpCalleeData: *WSABUF, | 951 | lpCalleeData: *WSABUF, |
| 952 | g: *u32, | 952 | g: *u32, |
| 953 | dwCallbackData: usize, | 953 | dwCallbackData: usize, |
| 954 | ) callconv(WINAPI) i32); | 954 | ) callconv(WINAPI) i32; |
| 955 | 955 | ||
| 956 | pub const LPWSAOVERLAPPED_COMPLETION_ROUTINE = std.meta.FnPtr(fn ( | 956 | pub const LPWSAOVERLAPPED_COMPLETION_ROUTINE = *const fn ( |
| 957 | dwError: u32, | 957 | dwError: u32, |
| 958 | cbTransferred: u32, | 958 | cbTransferred: u32, |
| 959 | lpOverlapped: *OVERLAPPED, | 959 | lpOverlapped: *OVERLAPPED, |
| 960 | dwFlags: u32, | 960 | dwFlags: u32, |
| 961 | ) callconv(WINAPI) void); | 961 | ) callconv(WINAPI) void; |
| 962 | 962 | ||
| 963 | pub const FLOWSPEC = extern struct { | 963 | pub const FLOWSPEC = extern struct { |
| 964 | TokenRate: u32, | 964 | TokenRate: u32, |
| ... | @@ -1173,7 +1173,7 @@ pub const TRANSMIT_FILE_BUFFERS = extern struct { | ... | @@ -1173,7 +1173,7 @@ pub const TRANSMIT_FILE_BUFFERS = extern struct { |
| 1173 | TailLength: u32, | 1173 | TailLength: u32, |
| 1174 | }; | 1174 | }; |
| 1175 | 1175 | ||
| 1176 | pub const LPFN_TRANSMITFILE = std.meta.FnPtr(fn ( | 1176 | pub const LPFN_TRANSMITFILE = *const fn ( |
| 1177 | hSocket: SOCKET, | 1177 | hSocket: SOCKET, |
| 1178 | hFile: HANDLE, | 1178 | hFile: HANDLE, |
| 1179 | nNumberOfBytesToWrite: u32, | 1179 | nNumberOfBytesToWrite: u32, |
| ... | @@ -1181,9 +1181,9 @@ pub const LPFN_TRANSMITFILE = std.meta.FnPtr(fn ( | ... | @@ -1181,9 +1181,9 @@ pub const LPFN_TRANSMITFILE = std.meta.FnPtr(fn ( |
| 1181 | lpOverlapped: ?*OVERLAPPED, | 1181 | lpOverlapped: ?*OVERLAPPED, |
| 1182 | lpTransmitBuffers: ?*TRANSMIT_FILE_BUFFERS, | 1182 | lpTransmitBuffers: ?*TRANSMIT_FILE_BUFFERS, |
| 1183 | dwReserved: u32, | 1183 | dwReserved: u32, |
| 1184 | ) callconv(WINAPI) BOOL); | 1184 | ) callconv(WINAPI) BOOL; |
| 1185 | 1185 | ||
| 1186 | pub const LPFN_ACCEPTEX = std.meta.FnPtr(fn ( | 1186 | pub const LPFN_ACCEPTEX = *const fn ( |
| 1187 | sListenSocket: SOCKET, | 1187 | sListenSocket: SOCKET, |
| 1188 | sAcceptSocket: SOCKET, | 1188 | sAcceptSocket: SOCKET, |
| 1189 | lpOutputBuffer: *anyopaque, | 1189 | lpOutputBuffer: *anyopaque, |
| ... | @@ -1192,9 +1192,9 @@ pub const LPFN_ACCEPTEX = std.meta.FnPtr(fn ( | ... | @@ -1192,9 +1192,9 @@ pub const LPFN_ACCEPTEX = std.meta.FnPtr(fn ( |
| 1192 | dwRemoteAddressLength: u32, | 1192 | dwRemoteAddressLength: u32, |
| 1193 | lpdwBytesReceived: *u32, | 1193 | lpdwBytesReceived: *u32, |
| 1194 | lpOverlapped: *OVERLAPPED, | 1194 | lpOverlapped: *OVERLAPPED, |
| 1195 | ) callconv(WINAPI) BOOL); | 1195 | ) callconv(WINAPI) BOOL; |
| 1196 | 1196 | ||
| 1197 | pub const LPFN_GETACCEPTEXSOCKADDRS = std.meta.FnPtr(fn ( | 1197 | pub const LPFN_GETACCEPTEXSOCKADDRS = *const fn ( |
| 1198 | lpOutputBuffer: *anyopaque, | 1198 | lpOutputBuffer: *anyopaque, |
| 1199 | dwReceiveDataLength: u32, | 1199 | dwReceiveDataLength: u32, |
| 1200 | dwLocalAddressLength: u32, | 1200 | dwLocalAddressLength: u32, |
| ... | @@ -1203,29 +1203,29 @@ pub const LPFN_GETACCEPTEXSOCKADDRS = std.meta.FnPtr(fn ( | ... | @@ -1203,29 +1203,29 @@ pub const LPFN_GETACCEPTEXSOCKADDRS = std.meta.FnPtr(fn ( |
| 1203 | LocalSockaddrLength: *i32, | 1203 | LocalSockaddrLength: *i32, |
| 1204 | RemoteSockaddr: **sockaddr, | 1204 | RemoteSockaddr: **sockaddr, |
| 1205 | RemoteSockaddrLength: *i32, | 1205 | RemoteSockaddrLength: *i32, |
| 1206 | ) callconv(WINAPI) void); | 1206 | ) callconv(WINAPI) void; |
| 1207 | 1207 | ||
| 1208 | pub const LPFN_WSASENDMSG = std.meta.FnPtr(fn ( | 1208 | pub const LPFN_WSASENDMSG = *const fn ( |
| 1209 | s: SOCKET, | 1209 | s: SOCKET, |
| 1210 | lpMsg: *const std.x.os.Socket.Message, | 1210 | lpMsg: *const std.x.os.Socket.Message, |
| 1211 | dwFlags: u32, | 1211 | dwFlags: u32, |
| 1212 | lpNumberOfBytesSent: ?*u32, | 1212 | lpNumberOfBytesSent: ?*u32, |
| 1213 | lpOverlapped: ?*OVERLAPPED, | 1213 | lpOverlapped: ?*OVERLAPPED, |
| 1214 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, | 1214 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 1215 | ) callconv(WINAPI) i32); | 1215 | ) callconv(WINAPI) i32; |
| 1216 | 1216 | ||
| 1217 | pub const LPFN_WSARECVMSG = std.meta.FnPtr(fn ( | 1217 | pub const LPFN_WSARECVMSG = *const fn ( |
| 1218 | s: SOCKET, | 1218 | s: SOCKET, |
| 1219 | lpMsg: *std.x.os.Socket.Message, | 1219 | lpMsg: *std.x.os.Socket.Message, |
| 1220 | lpdwNumberOfBytesRecv: ?*u32, | 1220 | lpdwNumberOfBytesRecv: ?*u32, |
| 1221 | lpOverlapped: ?*OVERLAPPED, | 1221 | lpOverlapped: ?*OVERLAPPED, |
| 1222 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, | 1222 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 1223 | ) callconv(WINAPI) i32); | 1223 | ) callconv(WINAPI) i32; |
| 1224 | 1224 | ||
| 1225 | pub const LPSERVICE_CALLBACK_PROC = std.meta.FnPtr(fn ( | 1225 | pub const LPSERVICE_CALLBACK_PROC = *const fn ( |
| 1226 | lParam: LPARAM, | 1226 | lParam: LPARAM, |
| 1227 | hAsyncTaskHandle: HANDLE, | 1227 | hAsyncTaskHandle: HANDLE, |
| 1228 | ) callconv(WINAPI) void); | 1228 | ) callconv(WINAPI) void; |
| 1229 | 1229 | ||
| 1230 | pub const SERVICE_ASYNC_INFO = extern struct { | 1230 | pub const SERVICE_ASYNC_INFO = extern struct { |
| 1231 | lpServiceCallbackProc: LPSERVICE_CALLBACK_PROC, | 1231 | lpServiceCallbackProc: LPSERVICE_CALLBACK_PROC, |
| ... | @@ -1233,11 +1233,11 @@ pub const SERVICE_ASYNC_INFO = extern struct { | ... | @@ -1233,11 +1233,11 @@ pub const SERVICE_ASYNC_INFO = extern struct { |
| 1233 | hAsyncTaskHandle: HANDLE, | 1233 | hAsyncTaskHandle: HANDLE, |
| 1234 | }; | 1234 | }; |
| 1235 | 1235 | ||
| 1236 | pub const LPLOOKUPSERVICE_COMPLETION_ROUTINE = std.meta.FnPtr(fn ( | 1236 | pub const LPLOOKUPSERVICE_COMPLETION_ROUTINE = *const fn ( |
| 1237 | dwError: u32, | 1237 | dwError: u32, |
| 1238 | dwBytes: u32, | 1238 | dwBytes: u32, |
| 1239 | lpOverlapped: *OVERLAPPED, | 1239 | lpOverlapped: *OVERLAPPED, |
| 1240 | ) callconv(WINAPI) void); | 1240 | ) callconv(WINAPI) void; |
| 1241 | 1241 | ||
| 1242 | pub const fd_set = extern struct { | 1242 | pub const fd_set = extern struct { |
| 1243 | fd_count: u32, | 1243 | fd_count: u32, |
lib/std/packed_int_array.zig+9-5| ... | @@ -338,12 +338,12 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type { | ... | @@ -338,12 +338,12 @@ pub fn PackedIntSliceEndian(comptime Int: type, comptime endian: Endian) type { |
| 338 | }; | 338 | }; |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | const we_are_testing_this_with_stage1_which_leaks_comptime_memory = true; | ||
| 342 | |||
| 343 | test "PackedIntArray" { | 341 | test "PackedIntArray" { |
| 344 | // TODO @setEvalBranchQuota generates panics in wasm32. Investigate. | 342 | // TODO @setEvalBranchQuota generates panics in wasm32. Investigate. |
| 345 | if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest; | 343 | if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest; |
| 346 | if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; | 344 | |
| 345 | // TODO: enable this test | ||
| 346 | if (true) return error.SkipZigTest; | ||
| 347 | 347 | ||
| 348 | @setEvalBranchQuota(10000); | 348 | @setEvalBranchQuota(10000); |
| 349 | const max_bits = 256; | 349 | const max_bits = 256; |
| ... | @@ -405,7 +405,9 @@ test "PackedIntArray initAllTo" { | ... | @@ -405,7 +405,9 @@ test "PackedIntArray initAllTo" { |
| 405 | test "PackedIntSlice" { | 405 | test "PackedIntSlice" { |
| 406 | // TODO @setEvalBranchQuota generates panics in wasm32. Investigate. | 406 | // TODO @setEvalBranchQuota generates panics in wasm32. Investigate. |
| 407 | if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest; | 407 | if (builtin.target.cpu.arch == .wasm32) return error.SkipZigTest; |
| 408 | if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; | 408 | |
| 409 | // TODO enable this test | ||
| 410 | if (true) return error.SkipZigTest; | ||
| 409 | 411 | ||
| 410 | @setEvalBranchQuota(10000); | 412 | @setEvalBranchQuota(10000); |
| 411 | const max_bits = 256; | 413 | const max_bits = 256; |
| ... | @@ -444,7 +446,9 @@ test "PackedIntSlice" { | ... | @@ -444,7 +446,9 @@ test "PackedIntSlice" { |
| 444 | } | 446 | } |
| 445 | 447 | ||
| 446 | test "PackedIntSlice of PackedInt(Array/Slice)" { | 448 | test "PackedIntSlice of PackedInt(Array/Slice)" { |
| 447 | if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest; | 449 | // TODO enable this test |
| 450 | if (true) return error.SkipZigTest; | ||
| 451 | |||
| 448 | const max_bits = 16; | 452 | const max_bits = 16; |
| 449 | const int_count = 19; | 453 | const int_count = 19; |
| 450 | 454 |
lib/std/rand.zig+1-1| ... | @@ -30,7 +30,7 @@ pub const RomuTrio = @import("rand/RomuTrio.zig"); | ... | @@ -30,7 +30,7 @@ pub const RomuTrio = @import("rand/RomuTrio.zig"); |
| 30 | 30 | ||
| 31 | pub const Random = struct { | 31 | pub const Random = struct { |
| 32 | ptr: *anyopaque, | 32 | ptr: *anyopaque, |
| 33 | fillFn: std.meta.FnPtr(fn (ptr: *anyopaque, buf: []u8) void), | 33 | fillFn: *const fn (ptr: *anyopaque, buf: []u8) void, |
| 34 | 34 | ||
| 35 | pub fn init(pointer: anytype, comptime fillFn: fn (ptr: @TypeOf(pointer), buf: []u8) void) Random { | 35 | pub fn init(pointer: anytype, comptime fillFn: fn (ptr: @TypeOf(pointer), buf: []u8) void) Random { |
| 36 | const Ptr = @TypeOf(pointer); | 36 | const Ptr = @TypeOf(pointer); |
lib/std/segmented_list.zig+1-1| ... | @@ -412,7 +412,7 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type | ... | @@ -412,7 +412,7 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | test "SegmentedList basic usage" { | 414 | test "SegmentedList basic usage" { |
| 415 | if (@import("builtin").zig_backend == .stage1) { | 415 | if (false) { |
| 416 | // https://github.com/ziglang/zig/issues/11787 | 416 | // https://github.com/ziglang/zig/issues/11787 |
| 417 | try testSegmentedList(0); | 417 | try testSegmentedList(0); |
| 418 | } | 418 | } |
lib/std/simd.zig+2-4| ... | @@ -191,9 +191,7 @@ pub fn extract( | ... | @@ -191,9 +191,7 @@ pub fn extract( |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | test "vector patterns" { | 193 | test "vector patterns" { |
| 194 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 194 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 195 | builtin.cpu.arch == .aarch64) | ||
| 196 | { | ||
| 197 | // https://github.com/ziglang/zig/issues/12012 | 195 | // https://github.com/ziglang/zig/issues/12012 |
| 198 | return error.SkipZigTest; | 196 | return error.SkipZigTest; |
| 199 | } | 197 | } |
| ... | @@ -419,7 +417,7 @@ test "vector prefix scan" { | ... | @@ -419,7 +417,7 @@ test "vector prefix scan" { |
| 419 | return error.SkipZigTest; | 417 | return error.SkipZigTest; |
| 420 | } | 418 | } |
| 421 | 419 | ||
| 422 | if (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) { | 420 | if (builtin.zig_backend == .stage2_llvm) { |
| 423 | // Regressed in LLVM 14: | 421 | // Regressed in LLVM 14: |
| 424 | // https://github.com/llvm/llvm-project/issues/55522 | 422 | // https://github.com/llvm/llvm-project/issues/55522 |
| 425 | return error.SkipZigTest; | 423 | return error.SkipZigTest; |
lib/std/unicode.zig+1-3| ... | @@ -354,9 +354,7 @@ fn testUtf16CountCodepoints() !void { | ... | @@ -354,9 +354,7 @@ fn testUtf16CountCodepoints() !void { |
| 354 | 354 | ||
| 355 | test "utf16 count codepoints" { | 355 | test "utf16 count codepoints" { |
| 356 | try testUtf16CountCodepoints(); | 356 | try testUtf16CountCodepoints(); |
| 357 | // TODO stage1 error: out of bounds slice | 357 | comptime try testUtf16CountCodepoints(); |
| 358 | if (@import("builtin").zig_backend != .stage1) | ||
| 359 | comptime try testUtf16CountCodepoints(); | ||
| 360 | } | 358 | } |
| 361 | 359 | ||
| 362 | test "utf8 encode" { | 360 | test "utf8 encode" { |
lib/std/zig/Ast.zig-2| ... | @@ -2009,8 +2009,6 @@ fn fullStructInit(tree: Ast, info: full.StructInit.Components) full.StructInit { | ... | @@ -2009,8 +2009,6 @@ fn fullStructInit(tree: Ast, info: full.StructInit.Components) full.StructInit { |
| 2009 | 2009 | ||
| 2010 | fn fullPtrType(tree: Ast, info: full.PtrType.Components) full.PtrType { | 2010 | fn fullPtrType(tree: Ast, info: full.PtrType.Components) full.PtrType { |
| 2011 | const token_tags = tree.tokens.items(.tag); | 2011 | const token_tags = tree.tokens.items(.tag); |
| 2012 | // TODO: looks like stage1 isn't quite smart enough to handle enum | ||
| 2013 | // literals in some places here | ||
| 2014 | const Size = std.builtin.Type.Pointer.Size; | 2012 | const Size = std.builtin.Type.Pointer.Size; |
| 2015 | const size: Size = switch (token_tags[info.main_token]) { | 2013 | const size: Size = switch (token_tags[info.main_token]) { |
| 2016 | .asterisk, | 2014 | .asterisk, |
lib/std/zig/c_translation.zig+4-18| ... | @@ -9,19 +9,13 @@ pub fn cast(comptime DestType: type, target: anytype) DestType { | ... | @@ -9,19 +9,13 @@ pub fn cast(comptime DestType: type, target: anytype) DestType { |
| 9 | // this function should behave like transCCast in translate-c, except it's for macros | 9 | // this function should behave like transCCast in translate-c, except it's for macros |
| 10 | const SourceType = @TypeOf(target); | 10 | const SourceType = @TypeOf(target); |
| 11 | switch (@typeInfo(DestType)) { | 11 | switch (@typeInfo(DestType)) { |
| 12 | .Fn => if (builtin.zig_backend == .stage1) | 12 | .Fn => return castToPtr(*const DestType, SourceType, target), |
| 13 | return castToPtr(DestType, SourceType, target) | ||
| 14 | else | ||
| 15 | return castToPtr(*const DestType, SourceType, target), | ||
| 16 | .Pointer => return castToPtr(DestType, SourceType, target), | 13 | .Pointer => return castToPtr(DestType, SourceType, target), |
| 17 | .Optional => |dest_opt| { | 14 | .Optional => |dest_opt| { |
| 18 | if (@typeInfo(dest_opt.child) == .Pointer) { | 15 | if (@typeInfo(dest_opt.child) == .Pointer) { |
| 19 | return castToPtr(DestType, SourceType, target); | 16 | return castToPtr(DestType, SourceType, target); |
| 20 | } else if (@typeInfo(dest_opt.child) == .Fn) { | 17 | } else if (@typeInfo(dest_opt.child) == .Fn) { |
| 21 | if (builtin.zig_backend == .stage1) | 18 | return castToPtr(?*const dest_opt.child, SourceType, target); |
| 22 | return castToPtr(DestType, SourceType, target) | ||
| 23 | else | ||
| 24 | return castToPtr(?*const dest_opt.child, SourceType, target); | ||
| 25 | } | 19 | } |
| 26 | }, | 20 | }, |
| 27 | .Int => { | 21 | .Int => { |
| ... | @@ -149,7 +143,7 @@ test "cast" { | ... | @@ -149,7 +143,7 @@ test "cast" { |
| 149 | try testing.expect(cast(?*anyopaque, -1) == @intToPtr(?*anyopaque, @bitCast(usize, @as(isize, -1)))); | 143 | try testing.expect(cast(?*anyopaque, -1) == @intToPtr(?*anyopaque, @bitCast(usize, @as(isize, -1)))); |
| 150 | try testing.expect(cast(?*anyopaque, foo) == @intToPtr(?*anyopaque, @bitCast(usize, @as(isize, -1)))); | 144 | try testing.expect(cast(?*anyopaque, foo) == @intToPtr(?*anyopaque, @bitCast(usize, @as(isize, -1)))); |
| 151 | 145 | ||
| 152 | const FnPtr = ?if (builtin.zig_backend == .stage1) fn (*anyopaque) void else *align(1) const fn (*anyopaque) void; | 146 | const FnPtr = ?*align(1) const fn (*anyopaque) void; |
| 153 | try testing.expect(cast(FnPtr, 0) == @intToPtr(FnPtr, @as(usize, 0))); | 147 | try testing.expect(cast(FnPtr, 0) == @intToPtr(FnPtr, @as(usize, 0))); |
| 154 | try testing.expect(cast(FnPtr, foo) == @intToPtr(FnPtr, @bitCast(usize, @as(isize, -1)))); | 148 | try testing.expect(cast(FnPtr, foo) == @intToPtr(FnPtr, @bitCast(usize, @as(isize, -1)))); |
| 155 | } | 149 | } |
| ... | @@ -160,12 +154,6 @@ pub fn sizeof(target: anytype) usize { | ... | @@ -160,12 +154,6 @@ pub fn sizeof(target: anytype) usize { |
| 160 | switch (@typeInfo(T)) { | 154 | switch (@typeInfo(T)) { |
| 161 | .Float, .Int, .Struct, .Union, .Array, .Bool, .Vector => return @sizeOf(T), | 155 | .Float, .Int, .Struct, .Union, .Array, .Bool, .Vector => return @sizeOf(T), |
| 162 | .Fn => { | 156 | .Fn => { |
| 163 | if (builtin.zig_backend == .stage1) { | ||
| 164 | // sizeof(main) returns 1, sizeof(&main) returns pointer size. | ||
| 165 | // We cannot distinguish those types in Zig, so use pointer size. | ||
| 166 | return @sizeOf(T); | ||
| 167 | } | ||
| 168 | |||
| 169 | // sizeof(main) in C returns 1 | 157 | // sizeof(main) in C returns 1 |
| 170 | return 1; | 158 | return 1; |
| 171 | }, | 159 | }, |
| ... | @@ -263,9 +251,7 @@ test "sizeof" { | ... | @@ -263,9 +251,7 @@ test "sizeof" { |
| 263 | try testing.expect(sizeof(*const *const [4:0]u8) == ptr_size); | 251 | try testing.expect(sizeof(*const *const [4:0]u8) == ptr_size); |
| 264 | try testing.expect(sizeof(*const [4]u8) == ptr_size); | 252 | try testing.expect(sizeof(*const [4]u8) == ptr_size); |
| 265 | 253 | ||
| 266 | if (builtin.zig_backend == .stage1) { | 254 | if (false) { // TODO |
| 267 | try testing.expect(sizeof(sizeof) == @sizeOf(@TypeOf(sizeof))); | ||
| 268 | } else if (false) { // TODO | ||
| 269 | try testing.expect(sizeof(&sizeof) == @sizeOf(@TypeOf(&sizeof))); | 255 | try testing.expect(sizeof(&sizeof) == @sizeOf(@TypeOf(&sizeof))); |
| 270 | try testing.expect(sizeof(sizeof) == 1); | 256 | try testing.expect(sizeof(sizeof) == 1); |
| 271 | } | 257 | } |
lib/std/zig/render.zig+1-1| ... | @@ -2211,7 +2211,7 @@ fn renderAsm( | ... | @@ -2211,7 +2211,7 @@ fn renderAsm( |
| 2211 | }, | 2211 | }, |
| 2212 | else => unreachable, | 2212 | else => unreachable, |
| 2213 | } | 2213 | } |
| 2214 | } else unreachable; // TODO shouldn't need this on while(true) | 2214 | } |
| 2215 | } | 2215 | } |
| 2216 | 2216 | ||
| 2217 | fn renderCall( | 2217 | fn renderCall( |
lib/std/zig/string_literal.zig+1-1| ... | @@ -266,7 +266,7 @@ pub fn parseWrite(writer: anytype, bytes: []const u8) error{OutOfMemory}!Result | ... | @@ -266,7 +266,7 @@ pub fn parseWrite(writer: anytype, bytes: []const u8) error{OutOfMemory}!Result |
| 266 | index += 1; | 266 | index += 1; |
| 267 | }, | 267 | }, |
| 268 | } | 268 | } |
| 269 | } else unreachable; // TODO should not need else unreachable on while(true) | 269 | } |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | /// Higher level API. Does not return extra info about parse errors. | 272 | /// Higher level API. Does not return extra info about parse errors. |
src/Compilation.zig+11-12| ... | @@ -5431,11 +5431,6 @@ pub fn build_crt_file( | ... | @@ -5431,11 +5431,6 @@ pub fn build_crt_file( |
| 5431 | }); | 5431 | }); |
| 5432 | errdefer comp.gpa.free(basename); | 5432 | errdefer comp.gpa.free(basename); |
| 5433 | 5433 | ||
| 5434 | // TODO: This is extracted into a local variable to work around a stage1 miscompilation. | ||
| 5435 | const emit_bin = Compilation.EmitLoc{ | ||
| 5436 | .directory = null, // Put it in the cache directory. | ||
| 5437 | .basename = basename, | ||
| 5438 | }; | ||
| 5439 | const sub_compilation = try Compilation.create(comp.gpa, .{ | 5434 | const sub_compilation = try Compilation.create(comp.gpa, .{ |
| 5440 | .local_cache_directory = comp.global_cache_directory, | 5435 | .local_cache_directory = comp.global_cache_directory, |
| 5441 | .global_cache_directory = comp.global_cache_directory, | 5436 | .global_cache_directory = comp.global_cache_directory, |
| ... | @@ -5447,7 +5442,10 @@ pub fn build_crt_file( | ... | @@ -5447,7 +5442,10 @@ pub fn build_crt_file( |
| 5447 | .output_mode = output_mode, | 5442 | .output_mode = output_mode, |
| 5448 | .thread_pool = comp.thread_pool, | 5443 | .thread_pool = comp.thread_pool, |
| 5449 | .libc_installation = comp.bin_file.options.libc_installation, | 5444 | .libc_installation = comp.bin_file.options.libc_installation, |
| 5450 | .emit_bin = emit_bin, | 5445 | .emit_bin = .{ |
| 5446 | .directory = null, // Put it in the cache directory. | ||
| 5447 | .basename = basename, | ||
| 5448 | }, | ||
| 5451 | .optimize_mode = comp.compilerRtOptMode(), | 5449 | .optimize_mode = comp.compilerRtOptMode(), |
| 5452 | .want_sanitize_c = false, | 5450 | .want_sanitize_c = false, |
| 5453 | .want_stack_check = false, | 5451 | .want_stack_check = false, |
| ... | @@ -5492,15 +5490,16 @@ pub fn build_crt_file( | ... | @@ -5492,15 +5490,16 @@ pub fn build_crt_file( |
| 5492 | }); | 5490 | }); |
| 5493 | } | 5491 | } |
| 5494 | 5492 | ||
| 5495 | pub fn stage1AddLinkLib(comp: *Compilation, lib_name: []const u8) !void { | 5493 | pub fn addLinkLib(comp: *Compilation, lib_name: []const u8) !void { |
| 5496 | // Avoid deadlocking on building import libs such as kernel32.lib | 5494 | // Avoid deadlocking on building import libs such as kernel32.lib |
| 5497 | // This can happen when the user uses `build-exe foo.obj -lkernel32` and then | 5495 | // This can happen when the user uses `build-exe foo.obj -lkernel32` and |
| 5498 | // when we create a sub-Compilation for zig libc, it also tries to build kernel32.lib. | 5496 | // then when we create a sub-Compilation for zig libc, it also tries to |
| 5497 | // build kernel32.lib. | ||
| 5499 | if (comp.bin_file.options.skip_linker_dependencies) return; | 5498 | if (comp.bin_file.options.skip_linker_dependencies) return; |
| 5500 | 5499 | ||
| 5501 | // This happens when an `extern "foo"` function is referenced by the stage1 backend. | 5500 | // This happens when an `extern "foo"` function is referenced. |
| 5502 | // If we haven't seen this library yet and we're targeting Windows, we need to queue up | 5501 | // If we haven't seen this library yet and we're targeting Windows, we need |
| 5503 | // a work item to produce the DLL import library for this. | 5502 | // to queue up a work item to produce the DLL import library for this. |
| 5504 | const gop = try comp.bin_file.options.system_libs.getOrPut(comp.gpa, lib_name); | 5503 | const gop = try comp.bin_file.options.system_libs.getOrPut(comp.gpa, lib_name); |
| 5505 | if (!gop.found_existing and comp.getTarget().os.tag == .windows) { | 5504 | if (!gop.found_existing and comp.getTarget().os.tag == .windows) { |
| 5506 | try comp.work_queue.writeItem(.{ | 5505 | try comp.work_queue.writeItem(.{ |
src/Module.zig+6-8| ... | @@ -71,7 +71,7 @@ import_table: std.StringArrayHashMapUnmanaged(*File) = .{}, | ... | @@ -71,7 +71,7 @@ import_table: std.StringArrayHashMapUnmanaged(*File) = .{}, |
| 71 | /// Keys are fully resolved file paths. This table owns the keys and values. | 71 | /// Keys are fully resolved file paths. This table owns the keys and values. |
| 72 | embed_table: std.StringHashMapUnmanaged(*EmbedFile) = .{}, | 72 | embed_table: std.StringHashMapUnmanaged(*EmbedFile) = .{}, |
| 73 | 73 | ||
| 74 | /// This is a temporary addition to stage2 in order to match stage1 behavior, | 74 | /// This is a temporary addition to stage2 in order to match legacy behavior, |
| 75 | /// however the end-game once the lang spec is settled will be to use a global | 75 | /// however the end-game once the lang spec is settled will be to use a global |
| 76 | /// InternPool for comptime memoized objects, making this behavior consistent across all types, | 76 | /// InternPool for comptime memoized objects, making this behavior consistent across all types, |
| 77 | /// not only string literals. Or, we might decide to not guarantee string literals | 77 | /// not only string literals. Or, we might decide to not guarantee string literals |
| ... | @@ -3544,17 +3544,15 @@ fn freeExportList(gpa: Allocator, export_list: *ArrayListUnmanaged(*Export)) voi | ... | @@ -3544,17 +3544,15 @@ fn freeExportList(gpa: Allocator, export_list: *ArrayListUnmanaged(*Export)) voi |
| 3544 | export_list.deinit(gpa); | 3544 | export_list.deinit(gpa); |
| 3545 | } | 3545 | } |
| 3546 | 3546 | ||
| 3547 | // TODO https://github.com/ziglang/zig/issues/8643 | ||
| 3547 | const data_has_safety_tag = @sizeOf(Zir.Inst.Data) != 8; | 3548 | const data_has_safety_tag = @sizeOf(Zir.Inst.Data) != 8; |
| 3548 | // TODO This is taking advantage of matching stage1 debug union layout. | 3549 | const HackDataLayout = extern struct { |
| 3549 | // We need a better language feature for initializing a union with | ||
| 3550 | // a runtime-known tag. | ||
| 3551 | const Stage1DataLayout = extern struct { | ||
| 3552 | data: [8]u8 align(@alignOf(Zir.Inst.Data)), | 3550 | data: [8]u8 align(@alignOf(Zir.Inst.Data)), |
| 3553 | safety_tag: u8, | 3551 | safety_tag: u8, |
| 3554 | }; | 3552 | }; |
| 3555 | comptime { | 3553 | comptime { |
| 3556 | if (data_has_safety_tag) { | 3554 | if (data_has_safety_tag) { |
| 3557 | assert(@sizeOf(Stage1DataLayout) == @sizeOf(Zir.Inst.Data)); | 3555 | assert(@sizeOf(HackDataLayout) == @sizeOf(Zir.Inst.Data)); |
| 3558 | } | 3556 | } |
| 3559 | } | 3557 | } |
| 3560 | 3558 | ||
| ... | @@ -3695,7 +3693,7 @@ pub fn astGenFile(mod: *Module, file: *File) !void { | ... | @@ -3695,7 +3693,7 @@ pub fn astGenFile(mod: *Module, file: *File) !void { |
| 3695 | const tags = zir.instructions.items(.tag); | 3693 | const tags = zir.instructions.items(.tag); |
| 3696 | for (zir.instructions.items(.data)) |*data, i| { | 3694 | for (zir.instructions.items(.data)) |*data, i| { |
| 3697 | const union_tag = Zir.Inst.Tag.data_tags[@enumToInt(tags[i])]; | 3695 | const union_tag = Zir.Inst.Tag.data_tags[@enumToInt(tags[i])]; |
| 3698 | const as_struct = @ptrCast(*Stage1DataLayout, data); | 3696 | const as_struct = @ptrCast(*HackDataLayout, data); |
| 3699 | as_struct.* = .{ | 3697 | as_struct.* = .{ |
| 3700 | .safety_tag = @enumToInt(union_tag), | 3698 | .safety_tag = @enumToInt(union_tag), |
| 3701 | .data = safety_buffer[i], | 3699 | .data = safety_buffer[i], |
| ... | @@ -3881,7 +3879,7 @@ pub fn astGenFile(mod: *Module, file: *File) !void { | ... | @@ -3881,7 +3879,7 @@ pub fn astGenFile(mod: *Module, file: *File) !void { |
| 3881 | if (data_has_safety_tag) { | 3879 | if (data_has_safety_tag) { |
| 3882 | // The `Data` union has a safety tag but in the file format we store it without. | 3880 | // The `Data` union has a safety tag but in the file format we store it without. |
| 3883 | for (file.zir.instructions.items(.data)) |*data, i| { | 3881 | for (file.zir.instructions.items(.data)) |*data, i| { |
| 3884 | const as_struct = @ptrCast(*const Stage1DataLayout, data); | 3882 | const as_struct = @ptrCast(*const HackDataLayout, data); |
| 3885 | safety_buffer[i] = as_struct.data; | 3883 | safety_buffer[i] = as_struct.data; |
| 3886 | } | 3884 | } |
| 3887 | } | 3885 | } |
src/Sema.zig+18-24| ... | @@ -1359,7 +1359,7 @@ fn analyzeBodyInner( | ... | @@ -1359,7 +1359,7 @@ fn analyzeBodyInner( |
| 1359 | break check_block.runtime_index; | 1359 | break check_block.runtime_index; |
| 1360 | } | 1360 | } |
| 1361 | check_block = check_block.parent.?; | 1361 | check_block = check_block.parent.?; |
| 1362 | } else unreachable; | 1362 | }; |
| 1363 | 1363 | ||
| 1364 | if (@enumToInt(target_runtime_index) < @enumToInt(block.runtime_index)) { | 1364 | if (@enumToInt(target_runtime_index) < @enumToInt(block.runtime_index)) { |
| 1365 | const runtime_src = block.runtime_cond orelse block.runtime_loop.?; | 1365 | const runtime_src = block.runtime_cond orelse block.runtime_loop.?; |
| ... | @@ -1733,7 +1733,7 @@ fn analyzeBodyInner( | ... | @@ -1733,7 +1733,7 @@ fn analyzeBodyInner( |
| 1733 | break always_noreturn; | 1733 | break always_noreturn; |
| 1734 | map.putAssumeCapacity(inst, air_inst); | 1734 | map.putAssumeCapacity(inst, air_inst); |
| 1735 | i += 1; | 1735 | i += 1; |
| 1736 | } else unreachable; | 1736 | }; |
| 1737 | 1737 | ||
| 1738 | // balance out dbg_block_begins in case of early noreturn | 1738 | // balance out dbg_block_begins in case of early noreturn |
| 1739 | const noreturn_inst = block.instructions.popOrNull(); | 1739 | const noreturn_inst = block.instructions.popOrNull(); |
| ... | @@ -3478,7 +3478,7 @@ fn zirMakePtrConst(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileErro | ... | @@ -3478,7 +3478,7 @@ fn zirMakePtrConst(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileErro |
| 3478 | .store => break candidate, | 3478 | .store => break candidate, |
| 3479 | else => break :ct, | 3479 | else => break :ct, |
| 3480 | } | 3480 | } |
| 3481 | } else unreachable; // TODO shouldn't need this | 3481 | }; |
| 3482 | 3482 | ||
| 3483 | while (true) { | 3483 | while (true) { |
| 3484 | if (search_index == 0) break :ct; | 3484 | if (search_index == 0) break :ct; |
| ... | @@ -3704,7 +3704,7 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com | ... | @@ -3704,7 +3704,7 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com |
| 3704 | .store => break candidate, | 3704 | .store => break candidate, |
| 3705 | else => break :ct, | 3705 | else => break :ct, |
| 3706 | } | 3706 | } |
| 3707 | } else unreachable; // TODO shouldn't need this | 3707 | }; |
| 3708 | 3708 | ||
| 3709 | const bitcast_inst = while (true) { | 3709 | const bitcast_inst = while (true) { |
| 3710 | if (search_index == 0) break :ct; | 3710 | if (search_index == 0) break :ct; |
| ... | @@ -3716,7 +3716,7 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com | ... | @@ -3716,7 +3716,7 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com |
| 3716 | .bitcast => break candidate, | 3716 | .bitcast => break candidate, |
| 3717 | else => break :ct, | 3717 | else => break :ct, |
| 3718 | } | 3718 | } |
| 3719 | } else unreachable; // TODO shouldn't need this | 3719 | }; |
| 3720 | 3720 | ||
| 3721 | const const_inst = while (true) { | 3721 | const const_inst = while (true) { |
| 3722 | if (search_index == 0) break :ct; | 3722 | if (search_index == 0) break :ct; |
| ... | @@ -3728,7 +3728,7 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com | ... | @@ -3728,7 +3728,7 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com |
| 3728 | .constant => break candidate, | 3728 | .constant => break candidate, |
| 3729 | else => break :ct, | 3729 | else => break :ct, |
| 3730 | } | 3730 | } |
| 3731 | } else unreachable; // TODO shouldn't need this | 3731 | }; |
| 3732 | 3732 | ||
| 3733 | const store_op = air_datas[store_inst].bin_op; | 3733 | const store_op = air_datas[store_inst].bin_op; |
| 3734 | const store_val = (try sema.resolveMaybeUndefVal(store_op.rhs)) orelse break :ct; | 3734 | const store_val = (try sema.resolveMaybeUndefVal(store_op.rhs)) orelse break :ct; |
| ... | @@ -8307,7 +8307,7 @@ fn handleExternLibName( | ... | @@ -8307,7 +8307,7 @@ fn handleExternLibName( |
| 8307 | .{ lib_name, lib_name }, | 8307 | .{ lib_name, lib_name }, |
| 8308 | ); | 8308 | ); |
| 8309 | } | 8309 | } |
| 8310 | comp.stage1AddLinkLib(lib_name) catch |err| { | 8310 | comp.addLinkLib(lib_name) catch |err| { |
| 8311 | return sema.fail(block, src_loc, "unable to add link lib '{s}': {s}", .{ | 8311 | return sema.fail(block, src_loc, "unable to add link lib '{s}': {s}", .{ |
| 8312 | lib_name, @errorName(err), | 8312 | lib_name, @errorName(err), |
| 8313 | }); | 8313 | }); |
| ... | @@ -8401,15 +8401,11 @@ fn funcCommon( | ... | @@ -8401,15 +8401,11 @@ fn funcCommon( |
| 8401 | } | 8401 | } |
| 8402 | } | 8402 | } |
| 8403 | 8403 | ||
| 8404 | // These locals are pulled out from the init expression below to work around | ||
| 8405 | // a stage1 compiler bug. | ||
| 8406 | // In the case of generic calling convention, or generic alignment, we use | 8404 | // In the case of generic calling convention, or generic alignment, we use |
| 8407 | // default values which are only meaningful for the generic function, *not* | 8405 | // default values which are only meaningful for the generic function, *not* |
| 8408 | // the instantiation, which can depend on comptime parameters. | 8406 | // the instantiation, which can depend on comptime parameters. |
| 8409 | // Related proposal: https://github.com/ziglang/zig/issues/11834 | 8407 | // Related proposal: https://github.com/ziglang/zig/issues/11834 |
| 8410 | const cc_workaround = cc orelse .Unspecified; | 8408 | const cc_resolved = cc orelse .Unspecified; |
| 8411 | const align_workaround = alignment orelse 0; | ||
| 8412 | |||
| 8413 | const param_types = try sema.arena.alloc(Type, block.params.items.len); | 8409 | const param_types = try sema.arena.alloc(Type, block.params.items.len); |
| 8414 | const comptime_params = try sema.arena.alloc(bool, block.params.items.len); | 8410 | const comptime_params = try sema.arena.alloc(bool, block.params.items.len); |
| 8415 | for (block.params.items) |param, i| { | 8411 | for (block.params.items) |param, i| { |
| ... | @@ -8421,7 +8417,7 @@ fn funcCommon( | ... | @@ -8421,7 +8417,7 @@ fn funcCommon( |
| 8421 | comptime_params, | 8417 | comptime_params, |
| 8422 | i, | 8418 | i, |
| 8423 | &is_generic, | 8419 | &is_generic, |
| 8424 | cc_workaround, | 8420 | cc_resolved, |
| 8425 | has_body, | 8421 | has_body, |
| 8426 | ) catch |err| switch (err) { | 8422 | ) catch |err| switch (err) { |
| 8427 | error.NeededSourceLocation => { | 8423 | error.NeededSourceLocation => { |
| ... | @@ -8433,7 +8429,7 @@ fn funcCommon( | ... | @@ -8433,7 +8429,7 @@ fn funcCommon( |
| 8433 | comptime_params, | 8429 | comptime_params, |
| 8434 | i, | 8430 | i, |
| 8435 | &is_generic, | 8431 | &is_generic, |
| 8436 | cc_workaround, | 8432 | cc_resolved, |
| 8437 | has_body, | 8433 | has_body, |
| 8438 | ); | 8434 | ); |
| 8439 | return error.AnalysisFail; | 8435 | return error.AnalysisFail; |
| ... | @@ -8481,10 +8477,10 @@ fn funcCommon( | ... | @@ -8481,10 +8477,10 @@ fn funcCommon( |
| 8481 | }; | 8477 | }; |
| 8482 | return sema.failWithOwnedErrorMsg(msg); | 8478 | return sema.failWithOwnedErrorMsg(msg); |
| 8483 | } | 8479 | } |
| 8484 | if (!Type.fnCallingConventionAllowsZigTypes(cc_workaround) and !try sema.validateExternType(return_type, .ret_ty)) { | 8480 | if (!Type.fnCallingConventionAllowsZigTypes(cc_resolved) and !try sema.validateExternType(return_type, .ret_ty)) { |
| 8485 | const msg = msg: { | 8481 | const msg = msg: { |
| 8486 | const msg = try sema.errMsg(block, ret_ty_src, "return type '{}' not allowed in function with calling convention '{s}'", .{ | 8482 | const msg = try sema.errMsg(block, ret_ty_src, "return type '{}' not allowed in function with calling convention '{s}'", .{ |
| 8487 | return_type.fmt(sema.mod), @tagName(cc_workaround), | 8483 | return_type.fmt(sema.mod), @tagName(cc_resolved), |
| 8488 | }); | 8484 | }); |
| 8489 | errdefer msg.destroy(sema.gpa); | 8485 | errdefer msg.destroy(sema.gpa); |
| 8490 | 8486 | ||
| ... | @@ -8533,7 +8529,7 @@ fn funcCommon( | ... | @@ -8533,7 +8529,7 @@ fn funcCommon( |
| 8533 | } | 8529 | } |
| 8534 | 8530 | ||
| 8535 | const arch = sema.mod.getTarget().cpu.arch; | 8531 | const arch = sema.mod.getTarget().cpu.arch; |
| 8536 | if (switch (cc_workaround) { | 8532 | if (switch (cc_resolved) { |
| 8537 | .Unspecified, .C, .Naked, .Async, .Inline => null, | 8533 | .Unspecified, .C, .Naked, .Async, .Inline => null, |
| 8538 | .Interrupt => switch (arch) { | 8534 | .Interrupt => switch (arch) { |
| 8539 | .x86, .x86_64, .avr, .msp430 => null, | 8535 | .x86, .x86_64, .avr, .msp430 => null, |
| ... | @@ -8569,13 +8565,13 @@ fn funcCommon( | ... | @@ -8569,13 +8565,13 @@ fn funcCommon( |
| 8569 | }, | 8565 | }, |
| 8570 | }) |allowed_platform| { | 8566 | }) |allowed_platform| { |
| 8571 | return sema.fail(block, cc_src, "callconv '{s}' is only available on {s}, not {s}", .{ | 8567 | return sema.fail(block, cc_src, "callconv '{s}' is only available on {s}, not {s}", .{ |
| 8572 | @tagName(cc_workaround), | 8568 | @tagName(cc_resolved), |
| 8573 | allowed_platform, | 8569 | allowed_platform, |
| 8574 | @tagName(arch), | 8570 | @tagName(arch), |
| 8575 | }); | 8571 | }); |
| 8576 | } | 8572 | } |
| 8577 | 8573 | ||
| 8578 | if (cc_workaround == .Inline and is_noinline) { | 8574 | if (cc_resolved == .Inline and is_noinline) { |
| 8579 | return sema.fail(block, cc_src, "'noinline' function cannot have callconv 'Inline'", .{}); | 8575 | return sema.fail(block, cc_src, "'noinline' function cannot have callconv 'Inline'", .{}); |
| 8580 | } | 8576 | } |
| 8581 | if (is_generic and sema.no_partial_func_ty) return error.GenericPoison; | 8577 | if (is_generic and sema.no_partial_func_ty) return error.GenericPoison; |
| ... | @@ -8593,9 +8589,9 @@ fn funcCommon( | ... | @@ -8593,9 +8589,9 @@ fn funcCommon( |
| 8593 | .param_types = param_types, | 8589 | .param_types = param_types, |
| 8594 | .comptime_params = comptime_params.ptr, | 8590 | .comptime_params = comptime_params.ptr, |
| 8595 | .return_type = return_type, | 8591 | .return_type = return_type, |
| 8596 | .cc = cc_workaround, | 8592 | .cc = cc_resolved, |
| 8597 | .cc_is_generic = cc == null, | 8593 | .cc_is_generic = cc == null, |
| 8598 | .alignment = align_workaround, | 8594 | .alignment = alignment orelse 0, |
| 8599 | .align_is_generic = alignment == null, | 8595 | .align_is_generic = alignment == null, |
| 8600 | .section_is_generic = section == .generic, | 8596 | .section_is_generic = section == .generic, |
| 8601 | .addrspace_is_generic = address_space == null, | 8597 | .addrspace_is_generic = address_space == null, |
| ... | @@ -14964,7 +14960,7 @@ fn zirClosureGet( | ... | @@ -14964,7 +14960,7 @@ fn zirClosureGet( |
| 14964 | break tv; | 14960 | break tv; |
| 14965 | } | 14961 | } |
| 14966 | scope = scope.parent.?; | 14962 | scope = scope.parent.?; |
| 14967 | } else unreachable; | 14963 | }; |
| 14968 | 14964 | ||
| 14969 | if (tv.val.tag() == .unreachable_value and !block.is_typeof and sema.func == null) { | 14965 | if (tv.val.tag() == .unreachable_value and !block.is_typeof and sema.func == null) { |
| 14970 | const msg = msg: { | 14966 | const msg = msg: { |
| ... | @@ -19107,8 +19103,6 @@ fn zirPtrCast(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air | ... | @@ -19107,8 +19103,6 @@ fn zirPtrCast(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air |
| 19107 | const operand_elem_size = operand_elem_ty.abiSize(target); | 19103 | const operand_elem_size = operand_elem_ty.abiSize(target); |
| 19108 | const dest_elem_size = dest_elem_ty.abiSize(target); | 19104 | const dest_elem_size = dest_elem_ty.abiSize(target); |
| 19109 | if (operand_elem_size != dest_elem_size) { | 19105 | if (operand_elem_size != dest_elem_size) { |
| 19110 | // note that this is not implemented in stage1 so we should probably wait | ||
| 19111 | // until that codebase is replaced before implementing this in stage2. | ||
| 19112 | return sema.fail(block, dest_ty_src, "TODO: implement @ptrCast between slices changing the length", .{}); | 19106 | return sema.fail(block, dest_ty_src, "TODO: implement @ptrCast between slices changing the length", .{}); |
| 19113 | } | 19107 | } |
| 19114 | } | 19108 | } |
src/ThreadPool.zig+1-4| ... | @@ -15,10 +15,7 @@ const Runnable = struct { | ... | @@ -15,10 +15,7 @@ const Runnable = struct { |
| 15 | runFn: RunProto, | 15 | runFn: RunProto, |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | const RunProto = switch (builtin.zig_backend) { | 18 | const RunProto = *const fn (*Runnable) void; |
| 19 | .stage1 => fn (*Runnable) void, | ||
| 20 | else => *const fn (*Runnable) void, | ||
| 21 | }; | ||
| 22 | 19 | ||
| 23 | pub fn init(pool: *ThreadPool, allocator: std.mem.Allocator) !void { | 20 | pub fn init(pool: *ThreadPool, allocator: std.mem.Allocator) !void { |
| 24 | pool.* = .{ | 21 | pool.* = .{ |
src/clang.zig+5-6| ... | @@ -161,12 +161,11 @@ pub const ASTUnit = opaque { | ... | @@ -161,12 +161,11 @@ pub const ASTUnit = opaque { |
| 161 | extern fn ZigClangASTUnit_getSourceManager(*ASTUnit) *SourceManager; | 161 | extern fn ZigClangASTUnit_getSourceManager(*ASTUnit) *SourceManager; |
| 162 | 162 | ||
| 163 | pub const visitLocalTopLevelDecls = ZigClangASTUnit_visitLocalTopLevelDecls; | 163 | pub const visitLocalTopLevelDecls = ZigClangASTUnit_visitLocalTopLevelDecls; |
| 164 | extern fn ZigClangASTUnit_visitLocalTopLevelDecls(*ASTUnit, context: ?*anyopaque, Fn: ?VisitorFn) bool; | 164 | extern fn ZigClangASTUnit_visitLocalTopLevelDecls( |
| 165 | 165 | *ASTUnit, | |
| 166 | const VisitorFn = if (@import("builtin").zig_backend == .stage1) | 166 | context: ?*anyopaque, |
| 167 | fn (?*anyopaque, *const Decl) callconv(.C) bool | 167 | Fn: ?*const fn (?*anyopaque, *const Decl) callconv(.C) bool, |
| 168 | else | 168 | ) bool; |
| 169 | *const fn (?*anyopaque, *const Decl) callconv(.C) bool; | ||
| 170 | 169 | ||
| 171 | pub const getLocalPreprocessingEntities_begin = ZigClangASTUnit_getLocalPreprocessingEntities_begin; | 170 | pub const getLocalPreprocessingEntities_begin = ZigClangASTUnit_getLocalPreprocessingEntities_begin; |
| 172 | extern fn ZigClangASTUnit_getLocalPreprocessingEntities_begin(*ASTUnit) PreprocessingRecord.iterator; | 171 | extern fn ZigClangASTUnit_getLocalPreprocessingEntities_begin(*ASTUnit) PreprocessingRecord.iterator; |
src/codegen.zig+1-42| ... | @@ -98,54 +98,13 @@ pub fn generateFunction( | ... | @@ -98,54 +98,13 @@ pub fn generateFunction( |
| 98 | .aarch64_be, | 98 | .aarch64_be, |
| 99 | .aarch64_32, | 99 | .aarch64_32, |
| 100 | => return @import("arch/aarch64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), | 100 | => return @import("arch/aarch64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), |
| 101 | //.arc => return Function(.arc).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 102 | //.avr => return Function(.avr).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 103 | //.bpfel => return Function(.bpfel).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 104 | //.bpfeb => return Function(.bpfeb).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 105 | //.hexagon => return Function(.hexagon).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 106 | //.mips => return Function(.mips).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 107 | //.mipsel => return Function(.mipsel).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 108 | //.mips64 => return Function(.mips64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 109 | //.mips64el => return Function(.mips64el).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 110 | //.msp430 => return Function(.msp430).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 111 | //.powerpc => return Function(.powerpc).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 112 | //.powerpc64 => return Function(.powerpc64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 113 | //.powerpc64le => return Function(.powerpc64le).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 114 | //.r600 => return Function(.r600).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 115 | //.amdgcn => return Function(.amdgcn).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 116 | //.riscv32 => return Function(.riscv32).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 117 | .riscv64 => return @import("arch/riscv64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), | 101 | .riscv64 => return @import("arch/riscv64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), |
| 118 | //.sparc => return Function(.sparc).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 119 | .sparc64 => return @import("arch/sparc64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), | 102 | .sparc64 => return @import("arch/sparc64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), |
| 120 | //.sparcel => return Function(.sparcel).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 121 | //.s390x => return Function(.s390x).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 122 | //.tce => return Function(.tce).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 123 | //.tcele => return Function(.tcele).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 124 | //.thumb => return Function(.thumb).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 125 | //.thumbeb => return Function(.thumbeb).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 126 | //.x86 => return Function(.x86).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 127 | .x86_64 => return @import("arch/x86_64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), | 103 | .x86_64 => return @import("arch/x86_64/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), |
| 128 | //.xcore => return Function(.xcore).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 129 | //.nvptx => return Function(.nvptx).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 130 | //.nvptx64 => return Function(.nvptx64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 131 | //.le32 => return Function(.le32).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 132 | //.le64 => return Function(.le64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 133 | //.amdil => return Function(.amdil).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 134 | //.amdil64 => return Function(.amdil64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 135 | //.hsail => return Function(.hsail).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 136 | //.hsail64 => return Function(.hsail64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 137 | //.spir => return Function(.spir).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 138 | //.spir64 => return Function(.spir64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 139 | //.kalimba => return Function(.kalimba).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 140 | //.shave => return Function(.shave).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 141 | //.lanai => return Function(.lanai).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 142 | //.renderscript32 => return Function(.renderscript32).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 143 | //.renderscript64 => return Function(.renderscript64).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 144 | //.ve => return Function(.ve).generate(bin_file, src_loc, func, air, liveness, code, debug_output), | ||
| 145 | .wasm32, | 104 | .wasm32, |
| 146 | .wasm64, | 105 | .wasm64, |
| 147 | => return @import("arch/wasm/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), | 106 | => return @import("arch/wasm/CodeGen.zig").generate(bin_file, src_loc, func, air, liveness, code, debug_output), |
| 148 | else => @panic("Backend architectures that don't have good support yet are commented out, to improve compilation performance. If you are interested in one of these other backends feel free to uncomment them. Eventually these will be completed, but stage1 is slow and a memory hog."), | 107 | else => unreachable, |
| 149 | } | 108 | } |
| 150 | } | 109 | } |
| 151 | 110 |
src/codegen/c.zig+2-4| ... | @@ -4972,8 +4972,7 @@ fn airStructFieldPtr(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -4972,8 +4972,7 @@ fn airStructFieldPtr(f: *Function, inst: Air.Inst.Index) !CValue { |
| 4972 | 4972 | ||
| 4973 | if (f.liveness.isUnused(inst)) { | 4973 | if (f.liveness.isUnused(inst)) { |
| 4974 | try reap(f, inst, &.{extra.struct_operand}); | 4974 | try reap(f, inst, &.{extra.struct_operand}); |
| 4975 | // TODO this @as is needed because of a stage1 bug | 4975 | return .none; |
| 4976 | return @as(CValue, CValue.none); | ||
| 4977 | } | 4976 | } |
| 4978 | 4977 | ||
| 4979 | const struct_ptr = try f.resolveInst(extra.struct_operand); | 4978 | const struct_ptr = try f.resolveInst(extra.struct_operand); |
| ... | @@ -4987,8 +4986,7 @@ fn airStructFieldPtrIndex(f: *Function, inst: Air.Inst.Index, index: u8) !CValue | ... | @@ -4987,8 +4986,7 @@ fn airStructFieldPtrIndex(f: *Function, inst: Air.Inst.Index, index: u8) !CValue |
| 4987 | 4986 | ||
| 4988 | if (f.liveness.isUnused(inst)) { | 4987 | if (f.liveness.isUnused(inst)) { |
| 4989 | try reap(f, inst, &.{ty_op.operand}); | 4988 | try reap(f, inst, &.{ty_op.operand}); |
| 4990 | // TODO this @as is needed because of a stage1 bug | 4989 | return .none; |
| 4991 | return @as(CValue, CValue.none); | ||
| 4992 | } | 4990 | } |
| 4993 | 4991 | ||
| 4994 | const struct_ptr = try f.resolveInst(ty_op.operand); | 4992 | const struct_ptr = try f.resolveInst(ty_op.operand); |
src/codegen/llvm.zig+8-8| ... | @@ -1392,8 +1392,9 @@ pub const Object = struct { | ... | @@ -1392,8 +1392,9 @@ pub const Object = struct { |
| 1392 | const dir_path = file.pkg.root_src_directory.path orelse "."; | 1392 | const dir_path = file.pkg.root_src_directory.path orelse "."; |
| 1393 | const sub_file_path_z = try gpa.dupeZ(u8, std.fs.path.basename(file.sub_file_path)); | 1393 | const sub_file_path_z = try gpa.dupeZ(u8, std.fs.path.basename(file.sub_file_path)); |
| 1394 | defer gpa.free(sub_file_path_z); | 1394 | defer gpa.free(sub_file_path_z); |
| 1395 | const stage1_workaround = std.fs.path.dirname(file.sub_file_path) orelse ""; | 1395 | const dir_path_z = try std.fs.path.joinZ(gpa, &.{ |
| 1396 | const dir_path_z = try std.fs.path.joinZ(gpa, &.{ dir_path, stage1_workaround }); | 1396 | dir_path, std.fs.path.dirname(file.sub_file_path) orelse "", |
| 1397 | }); | ||
| 1397 | defer gpa.free(dir_path_z); | 1398 | defer gpa.free(dir_path_z); |
| 1398 | const di_file = o.di_builder.?.createFile(sub_file_path_z, dir_path_z); | 1399 | const di_file = o.di_builder.?.createFile(sub_file_path_z, dir_path_z); |
| 1399 | gop.value_ptr.* = di_file.toNode(); | 1400 | gop.value_ptr.* = di_file.toNode(); |
| ... | @@ -6107,12 +6108,11 @@ pub const FuncGen = struct { | ... | @@ -6107,12 +6108,11 @@ pub const FuncGen = struct { |
| 6107 | } | 6108 | } |
| 6108 | 6109 | ||
| 6109 | fn airAssembly(self: *FuncGen, inst: Air.Inst.Index) !?*llvm.Value { | 6110 | fn airAssembly(self: *FuncGen, inst: Air.Inst.Index) !?*llvm.Value { |
| 6110 | // Eventually, the Zig compiler needs to be reworked to have inline assembly go | 6111 | // Eventually, the Zig compiler needs to be reworked to have inline |
| 6111 | // through the same parsing code regardless of backend, and have LLVM-flavored | 6112 | // assembly go through the same parsing code regardless of backend, and |
| 6112 | // inline assembly be *output* from that assembler. | 6113 | // have LLVM-flavored inline assembly be *output* from that assembler. |
| 6113 | // We don't have such an assembler implemented yet though. For now, this | 6114 | // We don't have such an assembler implemented yet though. For now, |
| 6114 | // implementation feeds the inline assembly code directly to LLVM, same | 6115 | // this implementation feeds the inline assembly code directly to LLVM. |
| 6115 | // as stage1. | ||
| 6116 | 6116 | ||
| 6117 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; | 6117 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; |
| 6118 | const extra = self.air.extraData(Air.Asm, ty_pl.payload); | 6118 | const extra = self.air.extraData(Air.Asm, ty_pl.payload); |
src/codegen/spirv/Section.zig-10| ... | @@ -333,8 +333,6 @@ fn extendedUnionSize(comptime Operand: type, operand: Operand) usize { | ... | @@ -333,8 +333,6 @@ fn extendedUnionSize(comptime Operand: type, operand: Operand) usize { |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | test "SPIR-V Section emit() - no operands" { | 335 | test "SPIR-V Section emit() - no operands" { |
| 336 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 337 | |||
| 338 | var section = Section{}; | 336 | var section = Section{}; |
| 339 | defer section.deinit(std.testing.allocator); | 337 | defer section.deinit(std.testing.allocator); |
| 340 | 338 | ||
| ... | @@ -344,8 +342,6 @@ test "SPIR-V Section emit() - no operands" { | ... | @@ -344,8 +342,6 @@ test "SPIR-V Section emit() - no operands" { |
| 344 | } | 342 | } |
| 345 | 343 | ||
| 346 | test "SPIR-V Section emit() - simple" { | 344 | test "SPIR-V Section emit() - simple" { |
| 347 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 348 | |||
| 349 | var section = Section{}; | 345 | var section = Section{}; |
| 350 | defer section.deinit(std.testing.allocator); | 346 | defer section.deinit(std.testing.allocator); |
| 351 | 347 | ||
| ... | @@ -362,8 +358,6 @@ test "SPIR-V Section emit() - simple" { | ... | @@ -362,8 +358,6 @@ test "SPIR-V Section emit() - simple" { |
| 362 | } | 358 | } |
| 363 | 359 | ||
| 364 | test "SPIR-V Section emit() - string" { | 360 | test "SPIR-V Section emit() - string" { |
| 365 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 366 | |||
| 367 | var section = Section{}; | 361 | var section = Section{}; |
| 368 | defer section.deinit(std.testing.allocator); | 362 | defer section.deinit(std.testing.allocator); |
| 369 | 363 | ||
| ... | @@ -389,8 +383,6 @@ test "SPIR-V Section emit() - string" { | ... | @@ -389,8 +383,6 @@ test "SPIR-V Section emit() - string" { |
| 389 | } | 383 | } |
| 390 | 384 | ||
| 391 | test "SPIR-V Section emit()- extended mask" { | 385 | test "SPIR-V Section emit()- extended mask" { |
| 392 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 393 | |||
| 394 | var section = Section{}; | 386 | var section = Section{}; |
| 395 | defer section.deinit(std.testing.allocator); | 387 | defer section.deinit(std.testing.allocator); |
| 396 | 388 | ||
| ... | @@ -415,8 +407,6 @@ test "SPIR-V Section emit()- extended mask" { | ... | @@ -415,8 +407,6 @@ test "SPIR-V Section emit()- extended mask" { |
| 415 | } | 407 | } |
| 416 | 408 | ||
| 417 | test "SPIR-V Section emit() - extended union" { | 409 | test "SPIR-V Section emit() - extended union" { |
| 418 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 419 | |||
| 420 | var section = Section{}; | 410 | var section = Section{}; |
| 421 | defer section.deinit(std.testing.allocator); | 411 | defer section.deinit(std.testing.allocator); |
| 422 | 412 |
src/main.zig+2-6| ... | @@ -3289,15 +3289,11 @@ fn parseCrossTargetOrReportFatalError( | ... | @@ -3289,15 +3289,11 @@ fn parseCrossTargetOrReportFatalError( |
| 3289 | fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); | 3289 | fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); |
| 3290 | }, | 3290 | }, |
| 3291 | error.UnknownObjectFormat => { | 3291 | error.UnknownObjectFormat => { |
| 3292 | { | 3292 | help: { |
| 3293 | var help_text = std.ArrayList(u8).init(allocator); | 3293 | var help_text = std.ArrayList(u8).init(allocator); |
| 3294 | defer help_text.deinit(); | 3294 | defer help_text.deinit(); |
| 3295 | inline for (@typeInfo(std.Target.ObjectFormat).Enum.fields) |field| { | 3295 | inline for (@typeInfo(std.Target.ObjectFormat).Enum.fields) |field| { |
| 3296 | help_text.writer().print(" {s}\n", .{field.name}) catch | 3296 | help_text.writer().print(" {s}\n", .{field.name}) catch break :help; |
| 3297 | // TODO change this back to `break :help` | ||
| 3298 | // this working around a stage1 bug. | ||
| 3299 | //break :help; | ||
| 3300 | @panic("out of memory"); | ||
| 3301 | } | 3297 | } |
| 3302 | std.log.info("available object formats:\n{s}", .{help_text.items}); | 3298 | std.log.info("available object formats:\n{s}", .{help_text.items}); |
| 3303 | } | 3299 | } |
src/print_air.zig+1-1| ... | @@ -848,7 +848,7 @@ const Writer = struct { | ... | @@ -848,7 +848,7 @@ const Writer = struct { |
| 848 | if ((bits >> 31) != 0) break :blk false; | 848 | if ((bits >> 31) != 0) break :blk false; |
| 849 | extra_index += 1; | 849 | extra_index += 1; |
| 850 | tomb_op_index += 31; | 850 | tomb_op_index += 31; |
| 851 | } else unreachable; | 851 | } |
| 852 | }; | 852 | }; |
| 853 | return w.writeInstRef(s, operand, dies); | 853 | return w.writeInstRef(s, operand, dies); |
| 854 | } | 854 | } |
src/target.zig+2-2| ... | @@ -523,13 +523,13 @@ pub const AtomicPtrAlignmentDiagnostics = struct { | ... | @@ -523,13 +523,13 @@ pub const AtomicPtrAlignmentDiagnostics = struct { |
| 523 | /// If ABI alignment of `ty` is OK for atomic operations, returns 0. | 523 | /// If ABI alignment of `ty` is OK for atomic operations, returns 0. |
| 524 | /// Otherwise returns the alignment required on a pointer for the target | 524 | /// Otherwise returns the alignment required on a pointer for the target |
| 525 | /// to perform atomic operations. | 525 | /// to perform atomic operations. |
| 526 | // TODO this function does not take into account CPU features, which can affect | ||
| 527 | // this value. Audit this! | ||
| 526 | pub fn atomicPtrAlignment( | 528 | pub fn atomicPtrAlignment( |
| 527 | target: std.Target, | 529 | target: std.Target, |
| 528 | ty: Type, | 530 | ty: Type, |
| 529 | diags: *AtomicPtrAlignmentDiagnostics, | 531 | diags: *AtomicPtrAlignmentDiagnostics, |
| 530 | ) AtomicPtrAlignmentError!u32 { | 532 | ) AtomicPtrAlignmentError!u32 { |
| 531 | // TODO this was ported from stage1 but it does not take into account CPU features, | ||
| 532 | // which can affect this value. Audit this! | ||
| 533 | const max_atomic_bits: u16 = switch (target.cpu.arch) { | 533 | const max_atomic_bits: u16 = switch (target.cpu.arch) { |
| 534 | .avr, | 534 | .avr, |
| 535 | .msp430, | 535 | .msp430, |
src/translate_c.zig+2-5| ... | @@ -1,6 +1,3 @@ | ... | @@ -1,6 +1,3 @@ |
| 1 | //! This is the userland implementation of translate-c which is used by both stage1 | ||
| 2 | //! and stage2. | ||
| 3 | |||
| 4 | const std = @import("std"); | 1 | const std = @import("std"); |
| 5 | const testing = std.testing; | 2 | const testing = std.testing; |
| 6 | const assert = std.debug.assert; | 3 | const assert = std.debug.assert; |
| ... | @@ -523,7 +520,7 @@ fn declVisitorNamesOnly(c: *Context, decl: *const clang.Decl) Error!void { | ... | @@ -523,7 +520,7 @@ fn declVisitorNamesOnly(c: *Context, decl: *const clang.Decl) Error!void { |
| 523 | child_ty = macroqualified_ty.getModifiedType().getTypePtr(); | 520 | child_ty = macroqualified_ty.getModifiedType().getTypePtr(); |
| 524 | }, | 521 | }, |
| 525 | else => return, | 522 | else => return, |
| 526 | } else unreachable; | 523 | }; |
| 527 | 524 | ||
| 528 | const result = try c.unnamed_typedefs.getOrPut(c.gpa, addr); | 525 | const result = try c.unnamed_typedefs.getOrPut(c.gpa, addr); |
| 529 | if (result.found_existing) { | 526 | if (result.found_existing) { |
| ... | @@ -629,7 +626,7 @@ fn visitFnDecl(c: *Context, fn_decl: *const clang.FunctionDecl) Error!void { | ... | @@ -629,7 +626,7 @@ fn visitFnDecl(c: *Context, fn_decl: *const clang.FunctionDecl) Error!void { |
| 629 | }, | 626 | }, |
| 630 | else => break fn_type, | 627 | else => break fn_type, |
| 631 | } | 628 | } |
| 632 | } else unreachable; | 629 | }; |
| 633 | const fn_ty = @ptrCast(*const clang.FunctionType, fn_type); | 630 | const fn_ty = @ptrCast(*const clang.FunctionType, fn_type); |
| 634 | const return_qt = fn_ty.getReturnType(); | 631 | const return_qt = fn_ty.getReturnType(); |
| 635 | 632 |
src/type.zig+4-6| ... | @@ -1554,10 +1554,10 @@ pub const Type = extern union { | ... | @@ -1554,10 +1554,10 @@ pub const Type = extern union { |
| 1554 | ) @TypeOf(writer).Error!void { | 1554 | ) @TypeOf(writer).Error!void { |
| 1555 | _ = options; | 1555 | _ = options; |
| 1556 | comptime assert(unused_format_string.len == 0); | 1556 | comptime assert(unused_format_string.len == 0); |
| 1557 | if (@import("builtin").zig_backend != .stage1) { | 1557 | if (true) { |
| 1558 | // This is disabled to work around a stage2 bug where this function recursively | 1558 | // This is disabled to work around a bug where this function |
| 1559 | // causes more generic function instantiations resulting in an infinite loop | 1559 | // recursively causes more generic function instantiations |
| 1560 | // in the compiler. | 1560 | // resulting in an infinite loop in the compiler. |
| 1561 | try writer.writeAll("[TODO fix internal compiler bug regarding dump]"); | 1561 | try writer.writeAll("[TODO fix internal compiler bug regarding dump]"); |
| 1562 | return; | 1562 | return; |
| 1563 | } | 1563 | } |
| ... | @@ -6551,9 +6551,7 @@ pub const Type = extern union { | ... | @@ -6551,9 +6551,7 @@ pub const Type = extern union { |
| 6551 | else => {}, | 6551 | else => {}, |
| 6552 | } | 6552 | } |
| 6553 | } else { | 6553 | } else { |
| 6554 | // TODO stage1 type inference bug | ||
| 6555 | const T = Type.Tag; | 6554 | const T = Type.Tag; |
| 6556 | |||
| 6557 | const type_payload = try arena.create(Type.Payload.ElemType); | 6555 | const type_payload = try arena.create(Type.Payload.ElemType); |
| 6558 | type_payload.* = .{ | 6556 | type_payload.* = .{ |
| 6559 | .base = .{ | 6557 | .base = .{ |
src/zig_llvm.h-2| ... | @@ -337,7 +337,6 @@ ZIG_EXTERN_C void ZigLLVMParseCommandLineOptions(size_t argc, const char *const | ... | @@ -337,7 +337,6 @@ ZIG_EXTERN_C void ZigLLVMParseCommandLineOptions(size_t argc, const char *const |
| 337 | 337 | ||
| 338 | // synchronize with llvm/include/ADT/Triple.h::ArchType | 338 | // synchronize with llvm/include/ADT/Triple.h::ArchType |
| 339 | // synchronize with std.Target.Cpu.Arch | 339 | // synchronize with std.Target.Cpu.Arch |
| 340 | // synchronize with src/stage1/target.cpp::arch_list | ||
| 341 | // synchronize with codegen/llvm/bindings.zig::ArchType | 340 | // synchronize with codegen/llvm/bindings.zig::ArchType |
| 342 | enum ZigLLVM_ArchType { | 341 | enum ZigLLVM_ArchType { |
| 343 | ZigLLVM_UnknownArch, | 342 | ZigLLVM_UnknownArch, |
| ... | @@ -428,7 +427,6 @@ enum ZigLLVM_VendorType { | ... | @@ -428,7 +427,6 @@ enum ZigLLVM_VendorType { |
| 428 | // synchronize with llvm/include/ADT/Triple.h::OsType | 427 | // synchronize with llvm/include/ADT/Triple.h::OsType |
| 429 | // synchronize with std.Target.Os.Tag | 428 | // synchronize with std.Target.Os.Tag |
| 430 | // synchronize with codegen/llvm/bindings.zig::OsType | 429 | // synchronize with codegen/llvm/bindings.zig::OsType |
| 431 | // synchronize with src/stage1/target.cpp::os_list | ||
| 432 | enum ZigLLVM_OSType { | 430 | enum ZigLLVM_OSType { |
| 433 | ZigLLVM_UnknownOS, | 431 | ZigLLVM_UnknownOS, |
| 434 | 432 |
test/behavior.zig+9-12| ... | @@ -94,6 +94,8 @@ test { | ... | @@ -94,6 +94,8 @@ test { |
| 94 | _ = @import("behavior/bugs/12551.zig"); | 94 | _ = @import("behavior/bugs/12551.zig"); |
| 95 | _ = @import("behavior/bugs/12644.zig"); | 95 | _ = @import("behavior/bugs/12644.zig"); |
| 96 | _ = @import("behavior/bugs/12680.zig"); | 96 | _ = @import("behavior/bugs/12680.zig"); |
| 97 | _ = @import("behavior/bugs/12723.zig"); | ||
| 98 | _ = @import("behavior/bugs/12776.zig"); | ||
| 97 | _ = @import("behavior/bugs/12786.zig"); | 99 | _ = @import("behavior/bugs/12786.zig"); |
| 98 | _ = @import("behavior/bugs/12794.zig"); | 100 | _ = @import("behavior/bugs/12794.zig"); |
| 99 | _ = @import("behavior/bugs/12801-1.zig"); | 101 | _ = @import("behavior/bugs/12801-1.zig"); |
| ... | @@ -112,8 +114,8 @@ test { | ... | @@ -112,8 +114,8 @@ test { |
| 112 | _ = @import("behavior/bugs/13069.zig"); | 114 | _ = @import("behavior/bugs/13069.zig"); |
| 113 | _ = @import("behavior/bugs/13112.zig"); | 115 | _ = @import("behavior/bugs/13112.zig"); |
| 114 | _ = @import("behavior/bugs/13128.zig"); | 116 | _ = @import("behavior/bugs/13128.zig"); |
| 115 | _ = @import("behavior/bugs/13164.zig"); | ||
| 116 | _ = @import("behavior/bugs/13159.zig"); | 117 | _ = @import("behavior/bugs/13159.zig"); |
| 118 | _ = @import("behavior/bugs/13164.zig"); | ||
| 117 | _ = @import("behavior/bugs/13171.zig"); | 119 | _ = @import("behavior/bugs/13171.zig"); |
| 118 | _ = @import("behavior/bugs/13285.zig"); | 120 | _ = @import("behavior/bugs/13285.zig"); |
| 119 | _ = @import("behavior/bugs/13435.zig"); | 121 | _ = @import("behavior/bugs/13435.zig"); |
| ... | @@ -126,7 +128,9 @@ test { | ... | @@ -126,7 +128,9 @@ test { |
| 126 | _ = @import("behavior/cast_int.zig"); | 128 | _ = @import("behavior/cast_int.zig"); |
| 127 | _ = @import("behavior/comptime_memory.zig"); | 129 | _ = @import("behavior/comptime_memory.zig"); |
| 128 | _ = @import("behavior/const_slice_child.zig"); | 130 | _ = @import("behavior/const_slice_child.zig"); |
| 131 | _ = @import("behavior/decltest.zig"); | ||
| 129 | _ = @import("behavior/defer.zig"); | 132 | _ = @import("behavior/defer.zig"); |
| 133 | _ = @import("behavior/empty_union.zig"); | ||
| 130 | _ = @import("behavior/enum.zig"); | 134 | _ = @import("behavior/enum.zig"); |
| 131 | _ = @import("behavior/error.zig"); | 135 | _ = @import("behavior/error.zig"); |
| 132 | _ = @import("behavior/eval.zig"); | 136 | _ = @import("behavior/eval.zig"); |
| ... | @@ -142,6 +146,7 @@ test { | ... | @@ -142,6 +146,7 @@ test { |
| 142 | _ = @import("behavior/if.zig"); | 146 | _ = @import("behavior/if.zig"); |
| 143 | _ = @import("behavior/import.zig"); | 147 | _ = @import("behavior/import.zig"); |
| 144 | _ = @import("behavior/incomplete_struct_param_tld.zig"); | 148 | _ = @import("behavior/incomplete_struct_param_tld.zig"); |
| 149 | _ = @import("behavior/inline_switch.zig"); | ||
| 145 | _ = @import("behavior/int128.zig"); | 150 | _ = @import("behavior/int128.zig"); |
| 146 | _ = @import("behavior/int_div.zig"); | 151 | _ = @import("behavior/int_div.zig"); |
| 147 | _ = @import("behavior/inttoptr.zig"); | 152 | _ = @import("behavior/inttoptr.zig"); |
| ... | @@ -154,6 +159,8 @@ test { | ... | @@ -154,6 +159,8 @@ test { |
| 154 | _ = @import("behavior/namespace_depends_on_compile_var.zig"); | 159 | _ = @import("behavior/namespace_depends_on_compile_var.zig"); |
| 155 | _ = @import("behavior/null.zig"); | 160 | _ = @import("behavior/null.zig"); |
| 156 | _ = @import("behavior/optional.zig"); | 161 | _ = @import("behavior/optional.zig"); |
| 162 | _ = @import("behavior/packed-struct.zig"); | ||
| 163 | _ = @import("behavior/packed_struct_explicit_backing_int.zig"); | ||
| 157 | _ = @import("behavior/pointers.zig"); | 164 | _ = @import("behavior/pointers.zig"); |
| 158 | _ = @import("behavior/popcount.zig"); | 165 | _ = @import("behavior/popcount.zig"); |
| 159 | _ = @import("behavior/prefetch.zig"); | 166 | _ = @import("behavior/prefetch.zig"); |
| ... | @@ -169,7 +176,6 @@ test { | ... | @@ -169,7 +176,6 @@ test { |
| 169 | _ = @import("behavior/slice_sentinel_comptime.zig"); | 176 | _ = @import("behavior/slice_sentinel_comptime.zig"); |
| 170 | _ = @import("behavior/src.zig"); | 177 | _ = @import("behavior/src.zig"); |
| 171 | _ = @import("behavior/struct.zig"); | 178 | _ = @import("behavior/struct.zig"); |
| 172 | _ = @import("behavior/packed-struct.zig"); | ||
| 173 | _ = @import("behavior/struct_contains_null_ptr_itself.zig"); | 179 | _ = @import("behavior/struct_contains_null_ptr_itself.zig"); |
| 174 | _ = @import("behavior/struct_contains_slice_of_itself.zig"); | 180 | _ = @import("behavior/struct_contains_slice_of_itself.zig"); |
| 175 | _ = @import("behavior/switch.zig"); | 181 | _ = @import("behavior/switch.zig"); |
| ... | @@ -180,6 +186,7 @@ test { | ... | @@ -180,6 +186,7 @@ test { |
| 180 | _ = @import("behavior/truncate.zig"); | 186 | _ = @import("behavior/truncate.zig"); |
| 181 | _ = @import("behavior/try.zig"); | 187 | _ = @import("behavior/try.zig"); |
| 182 | _ = @import("behavior/tuple.zig"); | 188 | _ = @import("behavior/tuple.zig"); |
| 189 | _ = @import("behavior/tuple_declarations.zig"); | ||
| 183 | _ = @import("behavior/type.zig"); | 190 | _ = @import("behavior/type.zig"); |
| 184 | _ = @import("behavior/type_info.zig"); | 191 | _ = @import("behavior/type_info.zig"); |
| 185 | _ = @import("behavior/typename.zig"); | 192 | _ = @import("behavior/typename.zig"); |
| ... | @@ -198,16 +205,6 @@ test { | ... | @@ -198,16 +205,6 @@ test { |
| 198 | _ = @import("behavior/wasm.zig"); | 205 | _ = @import("behavior/wasm.zig"); |
| 199 | } | 206 | } |
| 200 | 207 | ||
| 201 | if (builtin.zig_backend != .stage1) { | ||
| 202 | _ = @import("behavior/decltest.zig"); | ||
| 203 | _ = @import("behavior/packed_struct_explicit_backing_int.zig"); | ||
| 204 | _ = @import("behavior/empty_union.zig"); | ||
| 205 | _ = @import("behavior/inline_switch.zig"); | ||
| 206 | _ = @import("behavior/tuple_declarations.zig"); | ||
| 207 | _ = @import("behavior/bugs/12723.zig"); | ||
| 208 | _ = @import("behavior/bugs/12776.zig"); | ||
| 209 | } | ||
| 210 | |||
| 211 | if (builtin.os.tag != .wasi) { | 208 | if (builtin.os.tag != .wasi) { |
| 212 | _ = @import("behavior/asm.zig"); | 209 | _ = @import("behavior/asm.zig"); |
| 213 | } | 210 | } |
test/behavior/align.zig+1-15| ... | @@ -16,7 +16,6 @@ test "global variable alignment" { | ... | @@ -16,7 +16,6 @@ test "global variable alignment" { |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | test "slicing array of length 1 can not assume runtime index is always zero" { | 18 | test "slicing array of length 1 can not assume runtime index is always zero" { |
| 19 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 20 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 19 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 21 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 20 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 22 | 21 | ||
| ... | @@ -61,10 +60,6 @@ test "alignment of struct with pointer has same alignment as usize" { | ... | @@ -61,10 +60,6 @@ test "alignment of struct with pointer has same alignment as usize" { |
| 61 | } | 60 | } |
| 62 | 61 | ||
| 63 | test "alignment and size of structs with 128-bit fields" { | 62 | test "alignment and size of structs with 128-bit fields" { |
| 64 | if (builtin.zig_backend == .stage1) { | ||
| 65 | // stage1 gets the wrong answer for a lot of targets | ||
| 66 | return error.SkipZigTest; | ||
| 67 | } | ||
| 68 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 63 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 69 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 64 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 70 | 65 | ||
| ... | @@ -313,7 +308,6 @@ test "function alignment" { | ... | @@ -313,7 +308,6 @@ test "function alignment" { |
| 313 | } | 308 | } |
| 314 | 309 | ||
| 315 | test "implicitly decreasing fn alignment" { | 310 | test "implicitly decreasing fn alignment" { |
| 316 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 317 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 311 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 318 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 312 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 319 | 313 | ||
| ... | @@ -337,7 +331,6 @@ fn alignedBig() align(16) i32 { | ... | @@ -337,7 +331,6 @@ fn alignedBig() align(16) i32 { |
| 337 | 331 | ||
| 338 | test "@alignCast functions" { | 332 | test "@alignCast functions" { |
| 339 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 333 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 340 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 341 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 334 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 342 | 335 | ||
| 343 | // function alignment is a compile error on wasm32/wasm64 | 336 | // function alignment is a compile error on wasm32/wasm64 |
| ... | @@ -380,8 +373,6 @@ test "function align expression depends on generic parameter" { | ... | @@ -380,8 +373,6 @@ test "function align expression depends on generic parameter" { |
| 380 | } | 373 | } |
| 381 | 374 | ||
| 382 | test "function callconv expression depends on generic parameter" { | 375 | test "function callconv expression depends on generic parameter" { |
| 383 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 384 | |||
| 385 | const S = struct { | 376 | const S = struct { |
| 386 | fn doTheTest() !void { | 377 | fn doTheTest() !void { |
| 387 | try expect(foobar(.C, 1) == 2); | 378 | try expect(foobar(.C, 1) == 2); |
| ... | @@ -435,8 +426,6 @@ fn testIndex2(ptr: [*]align(4) u8, index: usize, comptime T: type) !void { | ... | @@ -435,8 +426,6 @@ fn testIndex2(ptr: [*]align(4) u8, index: usize, comptime T: type) !void { |
| 435 | } | 426 | } |
| 436 | 427 | ||
| 437 | test "alignment of function with c calling convention" { | 428 | test "alignment of function with c calling convention" { |
| 438 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 439 | |||
| 440 | var runtime_nothing = &nothing; | 429 | var runtime_nothing = &nothing; |
| 441 | const casted1 = @ptrCast(*const u8, runtime_nothing); | 430 | const casted1 = @ptrCast(*const u8, runtime_nothing); |
| 442 | const casted2 = @ptrCast(*const fn () callconv(.C) void, casted1); | 431 | const casted2 = @ptrCast(*const fn () callconv(.C) void, casted1); |
| ... | @@ -495,7 +484,7 @@ test "struct field explicit alignment" { | ... | @@ -495,7 +484,7 @@ test "struct field explicit alignment" { |
| 495 | } | 484 | } |
| 496 | 485 | ||
| 497 | test "align(@alignOf(T)) T does not force resolution of T" { | 486 | test "align(@alignOf(T)) T does not force resolution of T" { |
| 498 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | 487 | if (true) return error.SkipZigTest; // TODO |
| 499 | 488 | ||
| 500 | const S = struct { | 489 | const S = struct { |
| 501 | const A = struct { | 490 | const A = struct { |
| ... | @@ -519,7 +508,6 @@ test "align(@alignOf(T)) T does not force resolution of T" { | ... | @@ -519,7 +508,6 @@ test "align(@alignOf(T)) T does not force resolution of T" { |
| 519 | } | 508 | } |
| 520 | 509 | ||
| 521 | test "align(N) on functions" { | 510 | test "align(N) on functions" { |
| 522 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 523 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 511 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 524 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 512 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 525 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 513 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -557,8 +545,6 @@ test "@alignCast null" { | ... | @@ -557,8 +545,6 @@ test "@alignCast null" { |
| 557 | } | 545 | } |
| 558 | 546 | ||
| 559 | test "alignment of slice element" { | 547 | test "alignment of slice element" { |
| 560 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 561 | |||
| 562 | const a: []align(1024) const u8 = undefined; | 548 | const a: []align(1024) const u8 = undefined; |
| 563 | try expect(@TypeOf(&a[0]) == *align(1024) const u8); | 549 | try expect(@TypeOf(&a[0]) == *align(1024) const u8); |
| 564 | } | 550 | } |
test/behavior/array.zig-6| ... | @@ -102,12 +102,6 @@ test "array len field" { | ... | @@ -102,12 +102,6 @@ test "array len field" { |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | test "array with sentinels" { | 104 | test "array with sentinels" { |
| 105 | if (builtin.zig_backend == .stage1) { | ||
| 106 | // Stage1 test coverage disabled at runtime because of | ||
| 107 | // https://github.com/ziglang/zig/issues/4372 | ||
| 108 | return error.SkipZigTest; | ||
| 109 | } | ||
| 110 | |||
| 111 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 105 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 112 | 106 | ||
| 113 | const S = struct { | 107 | const S = struct { |
test/behavior/async_fn.zig+66-66| ... | @@ -8,7 +8,7 @@ const expectError = std.testing.expectError; | ... | @@ -8,7 +8,7 @@ const expectError = std.testing.expectError; |
| 8 | var global_x: i32 = 1; | 8 | var global_x: i32 = 1; |
| 9 | 9 | ||
| 10 | test "simple coroutine suspend and resume" { | 10 | test "simple coroutine suspend and resume" { |
| 11 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 11 | if (true) return error.SkipZigTest; // TODO |
| 12 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 12 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 13 | 13 | ||
| 14 | var frame = async simpleAsyncFn(); | 14 | var frame = async simpleAsyncFn(); |
| ... | @@ -31,7 +31,7 @@ fn simpleAsyncFn() void { | ... | @@ -31,7 +31,7 @@ fn simpleAsyncFn() void { |
| 31 | var global_y: i32 = 1; | 31 | var global_y: i32 = 1; |
| 32 | 32 | ||
| 33 | test "pass parameter to coroutine" { | 33 | test "pass parameter to coroutine" { |
| 34 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 34 | if (true) return error.SkipZigTest; // TODO |
| 35 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 35 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 36 | 36 | ||
| 37 | var p = async simpleAsyncFnWithArg(2); | 37 | var p = async simpleAsyncFnWithArg(2); |
| ... | @@ -46,7 +46,7 @@ fn simpleAsyncFnWithArg(delta: i32) void { | ... | @@ -46,7 +46,7 @@ fn simpleAsyncFnWithArg(delta: i32) void { |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | test "suspend at end of function" { | 48 | test "suspend at end of function" { |
| 49 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 49 | if (true) return error.SkipZigTest; // TODO |
| 50 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 50 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 51 | 51 | ||
| 52 | const S = struct { | 52 | const S = struct { |
| ... | @@ -68,7 +68,7 @@ test "suspend at end of function" { | ... | @@ -68,7 +68,7 @@ test "suspend at end of function" { |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | test "local variable in async function" { | 70 | test "local variable in async function" { |
| 71 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 71 | if (true) return error.SkipZigTest; // TODO |
| 72 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 72 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 73 | 73 | ||
| 74 | const S = struct { | 74 | const S = struct { |
| ... | @@ -100,7 +100,7 @@ test "local variable in async function" { | ... | @@ -100,7 +100,7 @@ test "local variable in async function" { |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | test "calling an inferred async function" { | 102 | test "calling an inferred async function" { |
| 103 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 103 | if (true) return error.SkipZigTest; // TODO |
| 104 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 104 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 105 | 105 | ||
| 106 | const S = struct { | 106 | const S = struct { |
| ... | @@ -127,7 +127,7 @@ test "calling an inferred async function" { | ... | @@ -127,7 +127,7 @@ test "calling an inferred async function" { |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | test "@frameSize" { | 129 | test "@frameSize" { |
| 130 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 130 | if (true) return error.SkipZigTest; // TODO |
| 131 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 131 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 132 | 132 | ||
| 133 | if (builtin.target.cpu.arch == .thumb or builtin.target.cpu.arch == .thumbeb) | 133 | if (builtin.target.cpu.arch == .thumb or builtin.target.cpu.arch == .thumbeb) |
| ... | @@ -161,7 +161,7 @@ test "@frameSize" { | ... | @@ -161,7 +161,7 @@ test "@frameSize" { |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | test "coroutine suspend, resume" { | 163 | test "coroutine suspend, resume" { |
| 164 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 164 | if (true) return error.SkipZigTest; // TODO |
| 165 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 165 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 166 | 166 | ||
| 167 | const S = struct { | 167 | const S = struct { |
| ... | @@ -205,7 +205,7 @@ test "coroutine suspend, resume" { | ... | @@ -205,7 +205,7 @@ test "coroutine suspend, resume" { |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | test "coroutine suspend with block" { | 207 | test "coroutine suspend with block" { |
| 208 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 208 | if (true) return error.SkipZigTest; // TODO |
| 209 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 209 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 210 | 210 | ||
| 211 | const p = async testSuspendBlock(); | 211 | const p = async testSuspendBlock(); |
| ... | @@ -234,7 +234,7 @@ var await_a_promise: anyframe = undefined; | ... | @@ -234,7 +234,7 @@ var await_a_promise: anyframe = undefined; |
| 234 | var await_final_result: i32 = 0; | 234 | var await_final_result: i32 = 0; |
| 235 | 235 | ||
| 236 | test "coroutine await" { | 236 | test "coroutine await" { |
| 237 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 237 | if (true) return error.SkipZigTest; // TODO |
| 238 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 238 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 239 | 239 | ||
| 240 | await_seq('a'); | 240 | await_seq('a'); |
| ... | @@ -274,7 +274,7 @@ fn await_seq(c: u8) void { | ... | @@ -274,7 +274,7 @@ fn await_seq(c: u8) void { |
| 274 | var early_final_result: i32 = 0; | 274 | var early_final_result: i32 = 0; |
| 275 | 275 | ||
| 276 | test "coroutine await early return" { | 276 | test "coroutine await early return" { |
| 277 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 277 | if (true) return error.SkipZigTest; // TODO |
| 278 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 278 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 279 | 279 | ||
| 280 | early_seq('a'); | 280 | early_seq('a'); |
| ... | @@ -305,7 +305,7 @@ fn early_seq(c: u8) void { | ... | @@ -305,7 +305,7 @@ fn early_seq(c: u8) void { |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | test "async function with dot syntax" { | 307 | test "async function with dot syntax" { |
| 308 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 308 | if (true) return error.SkipZigTest; // TODO |
| 309 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 309 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 310 | 310 | ||
| 311 | const S = struct { | 311 | const S = struct { |
| ... | @@ -321,7 +321,7 @@ test "async function with dot syntax" { | ... | @@ -321,7 +321,7 @@ test "async function with dot syntax" { |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | test "async fn pointer in a struct field" { | 323 | test "async fn pointer in a struct field" { |
| 324 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 324 | if (true) return error.SkipZigTest; // TODO |
| 325 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 325 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 326 | 326 | ||
| 327 | var data: i32 = 1; | 327 | var data: i32 = 1; |
| ... | @@ -349,7 +349,7 @@ fn simpleAsyncFn2(y: *i32) callconv(.Async) void { | ... | @@ -349,7 +349,7 @@ fn simpleAsyncFn2(y: *i32) callconv(.Async) void { |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | test "@asyncCall with return type" { | 351 | test "@asyncCall with return type" { |
| 352 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 352 | if (true) return error.SkipZigTest; // TODO |
| 353 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 353 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 354 | 354 | ||
| 355 | const Foo = struct { | 355 | const Foo = struct { |
| ... | @@ -376,7 +376,7 @@ test "@asyncCall with return type" { | ... | @@ -376,7 +376,7 @@ test "@asyncCall with return type" { |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | test "async fn with inferred error set" { | 378 | test "async fn with inferred error set" { |
| 379 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 379 | if (true) return error.SkipZigTest; // TODO |
| 380 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 380 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 381 | 381 | ||
| 382 | const S = struct { | 382 | const S = struct { |
| ... | @@ -409,7 +409,7 @@ test "async fn with inferred error set" { | ... | @@ -409,7 +409,7 @@ test "async fn with inferred error set" { |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | test "error return trace across suspend points - early return" { | 411 | test "error return trace across suspend points - early return" { |
| 412 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 412 | if (true) return error.SkipZigTest; // TODO |
| 413 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 413 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 414 | 414 | ||
| 415 | const p = nonFailing(); | 415 | const p = nonFailing(); |
| ... | @@ -419,7 +419,7 @@ test "error return trace across suspend points - early return" { | ... | @@ -419,7 +419,7 @@ test "error return trace across suspend points - early return" { |
| 419 | } | 419 | } |
| 420 | 420 | ||
| 421 | test "error return trace across suspend points - async return" { | 421 | test "error return trace across suspend points - async return" { |
| 422 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 422 | if (true) return error.SkipZigTest; // TODO |
| 423 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 423 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 424 | 424 | ||
| 425 | const p = nonFailing(); | 425 | const p = nonFailing(); |
| ... | @@ -452,7 +452,7 @@ fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void { | ... | @@ -452,7 +452,7 @@ fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void { |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | test "break from suspend" { | 454 | test "break from suspend" { |
| 455 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 455 | if (true) return error.SkipZigTest; // TODO |
| 456 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 456 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 457 | 457 | ||
| 458 | var my_result: i32 = 1; | 458 | var my_result: i32 = 1; |
| ... | @@ -470,7 +470,7 @@ fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void { | ... | @@ -470,7 +470,7 @@ fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void { |
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | test "heap allocated async function frame" { | 472 | test "heap allocated async function frame" { |
| 473 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 473 | if (true) return error.SkipZigTest; // TODO |
| 474 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 474 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 475 | 475 | ||
| 476 | const S = struct { | 476 | const S = struct { |
| ... | @@ -497,7 +497,7 @@ test "heap allocated async function frame" { | ... | @@ -497,7 +497,7 @@ test "heap allocated async function frame" { |
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | test "async function call return value" { | 499 | test "async function call return value" { |
| 500 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 500 | if (true) return error.SkipZigTest; // TODO |
| 501 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 501 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 502 | 502 | ||
| 503 | const S = struct { | 503 | const S = struct { |
| ... | @@ -541,7 +541,7 @@ test "async function call return value" { | ... | @@ -541,7 +541,7 @@ test "async function call return value" { |
| 541 | } | 541 | } |
| 542 | 542 | ||
| 543 | test "suspension points inside branching control flow" { | 543 | test "suspension points inside branching control flow" { |
| 544 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 544 | if (true) return error.SkipZigTest; // TODO |
| 545 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 545 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 546 | 546 | ||
| 547 | const S = struct { | 547 | const S = struct { |
| ... | @@ -570,7 +570,7 @@ test "suspension points inside branching control flow" { | ... | @@ -570,7 +570,7 @@ test "suspension points inside branching control flow" { |
| 570 | } | 570 | } |
| 571 | 571 | ||
| 572 | test "call async function which has struct return type" { | 572 | test "call async function which has struct return type" { |
| 573 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 573 | if (true) return error.SkipZigTest; // TODO |
| 574 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 574 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 575 | 575 | ||
| 576 | const S = struct { | 576 | const S = struct { |
| ... | @@ -606,7 +606,7 @@ test "call async function which has struct return type" { | ... | @@ -606,7 +606,7 @@ test "call async function which has struct return type" { |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | test "pass string literal to async function" { | 608 | test "pass string literal to async function" { |
| 609 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 609 | if (true) return error.SkipZigTest; // TODO |
| 610 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 610 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 611 | 611 | ||
| 612 | const S = struct { | 612 | const S = struct { |
| ... | @@ -630,7 +630,7 @@ test "pass string literal to async function" { | ... | @@ -630,7 +630,7 @@ test "pass string literal to async function" { |
| 630 | } | 630 | } |
| 631 | 631 | ||
| 632 | test "await inside an errdefer" { | 632 | test "await inside an errdefer" { |
| 633 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 633 | if (true) return error.SkipZigTest; // TODO |
| 634 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 634 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 635 | 635 | ||
| 636 | const S = struct { | 636 | const S = struct { |
| ... | @@ -656,7 +656,7 @@ test "await inside an errdefer" { | ... | @@ -656,7 +656,7 @@ test "await inside an errdefer" { |
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | test "try in an async function with error union and non-zero-bit payload" { | 658 | test "try in an async function with error union and non-zero-bit payload" { |
| 659 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 659 | if (true) return error.SkipZigTest; // TODO |
| 660 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 660 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 661 | 661 | ||
| 662 | const S = struct { | 662 | const S = struct { |
| ... | @@ -689,7 +689,7 @@ test "try in an async function with error union and non-zero-bit payload" { | ... | @@ -689,7 +689,7 @@ test "try in an async function with error union and non-zero-bit payload" { |
| 689 | } | 689 | } |
| 690 | 690 | ||
| 691 | test "returning a const error from async function" { | 691 | test "returning a const error from async function" { |
| 692 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 692 | if (true) return error.SkipZigTest; // TODO |
| 693 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 693 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 694 | 694 | ||
| 695 | const S = struct { | 695 | const S = struct { |
| ... | @@ -723,7 +723,7 @@ test "returning a const error from async function" { | ... | @@ -723,7 +723,7 @@ test "returning a const error from async function" { |
| 723 | } | 723 | } |
| 724 | 724 | ||
| 725 | test "async/await typical usage" { | 725 | test "async/await typical usage" { |
| 726 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 726 | if (true) return error.SkipZigTest; // TODO |
| 727 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 727 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 728 | 728 | ||
| 729 | inline for ([_]bool{ false, true }) |b1| { | 729 | inline for ([_]bool{ false, true }) |b1| { |
| ... | @@ -821,7 +821,7 @@ fn testAsyncAwaitTypicalUsage( | ... | @@ -821,7 +821,7 @@ fn testAsyncAwaitTypicalUsage( |
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | test "alignment of local variables in async functions" { | 823 | test "alignment of local variables in async functions" { |
| 824 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 824 | if (true) return error.SkipZigTest; // TODO |
| 825 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 825 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 826 | 826 | ||
| 827 | const S = struct { | 827 | const S = struct { |
| ... | @@ -836,7 +836,7 @@ test "alignment of local variables in async functions" { | ... | @@ -836,7 +836,7 @@ test "alignment of local variables in async functions" { |
| 836 | } | 836 | } |
| 837 | 837 | ||
| 838 | test "no reason to resolve frame still works" { | 838 | test "no reason to resolve frame still works" { |
| 839 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 839 | if (true) return error.SkipZigTest; // TODO |
| 840 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 840 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 841 | 841 | ||
| 842 | _ = async simpleNothing(); | 842 | _ = async simpleNothing(); |
| ... | @@ -847,7 +847,7 @@ fn simpleNothing() void { | ... | @@ -847,7 +847,7 @@ fn simpleNothing() void { |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | test "async call a generic function" { | 849 | test "async call a generic function" { |
| 850 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 850 | if (true) return error.SkipZigTest; // TODO |
| 851 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 851 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 852 | 852 | ||
| 853 | const S = struct { | 853 | const S = struct { |
| ... | @@ -870,7 +870,7 @@ test "async call a generic function" { | ... | @@ -870,7 +870,7 @@ test "async call a generic function" { |
| 870 | } | 870 | } |
| 871 | 871 | ||
| 872 | test "return from suspend block" { | 872 | test "return from suspend block" { |
| 873 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 873 | if (true) return error.SkipZigTest; // TODO |
| 874 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 874 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 875 | 875 | ||
| 876 | const S = struct { | 876 | const S = struct { |
| ... | @@ -887,7 +887,7 @@ test "return from suspend block" { | ... | @@ -887,7 +887,7 @@ test "return from suspend block" { |
| 887 | } | 887 | } |
| 888 | 888 | ||
| 889 | test "struct parameter to async function is copied to the frame" { | 889 | test "struct parameter to async function is copied to the frame" { |
| 890 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 890 | if (true) return error.SkipZigTest; // TODO |
| 891 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 891 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 892 | 892 | ||
| 893 | const S = struct { | 893 | const S = struct { |
| ... | @@ -934,7 +934,7 @@ test "struct parameter to async function is copied to the frame" { | ... | @@ -934,7 +934,7 @@ test "struct parameter to async function is copied to the frame" { |
| 934 | } | 934 | } |
| 935 | 935 | ||
| 936 | test "cast fn to async fn when it is inferred to be async" { | 936 | test "cast fn to async fn when it is inferred to be async" { |
| 937 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 937 | if (true) return error.SkipZigTest; // TODO |
| 938 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 938 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 939 | 939 | ||
| 940 | const S = struct { | 940 | const S = struct { |
| ... | @@ -965,7 +965,7 @@ test "cast fn to async fn when it is inferred to be async" { | ... | @@ -965,7 +965,7 @@ test "cast fn to async fn when it is inferred to be async" { |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | test "cast fn to async fn when it is inferred to be async, awaited directly" { | 967 | test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| 968 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 968 | if (true) return error.SkipZigTest; // TODO |
| 969 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 969 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 970 | 970 | ||
| 971 | const S = struct { | 971 | const S = struct { |
| ... | @@ -995,7 +995,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" { | ... | @@ -995,7 +995,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| 995 | } | 995 | } |
| 996 | 996 | ||
| 997 | test "await does not force async if callee is blocking" { | 997 | test "await does not force async if callee is blocking" { |
| 998 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 998 | if (true) return error.SkipZigTest; // TODO |
| 999 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 999 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1000 | 1000 | ||
| 1001 | const S = struct { | 1001 | const S = struct { |
| ... | @@ -1008,7 +1008,7 @@ test "await does not force async if callee is blocking" { | ... | @@ -1008,7 +1008,7 @@ test "await does not force async if callee is blocking" { |
| 1008 | } | 1008 | } |
| 1009 | 1009 | ||
| 1010 | test "recursive async function" { | 1010 | test "recursive async function" { |
| 1011 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1011 | if (true) return error.SkipZigTest; // TODO |
| 1012 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1012 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1013 | 1013 | ||
| 1014 | try expect(recursiveAsyncFunctionTest(false).doTheTest() == 55); | 1014 | try expect(recursiveAsyncFunctionTest(false).doTheTest() == 55); |
| ... | @@ -1073,7 +1073,7 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { | ... | @@ -1073,7 +1073,7 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { |
| 1073 | } | 1073 | } |
| 1074 | 1074 | ||
| 1075 | test "@asyncCall with comptime-known function, but not awaited directly" { | 1075 | test "@asyncCall with comptime-known function, but not awaited directly" { |
| 1076 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1076 | if (true) return error.SkipZigTest; // TODO |
| 1077 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1077 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1078 | 1078 | ||
| 1079 | const S = struct { | 1079 | const S = struct { |
| ... | @@ -1105,7 +1105,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" { | ... | @@ -1105,7 +1105,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" { |
| 1105 | } | 1105 | } |
| 1106 | 1106 | ||
| 1107 | test "@asyncCall with actual frame instead of byte buffer" { | 1107 | test "@asyncCall with actual frame instead of byte buffer" { |
| 1108 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1108 | if (true) return error.SkipZigTest; // TODO |
| 1109 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1109 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1110 | 1110 | ||
| 1111 | const S = struct { | 1111 | const S = struct { |
| ... | @@ -1122,7 +1122,7 @@ test "@asyncCall with actual frame instead of byte buffer" { | ... | @@ -1122,7 +1122,7 @@ test "@asyncCall with actual frame instead of byte buffer" { |
| 1122 | } | 1122 | } |
| 1123 | 1123 | ||
| 1124 | test "@asyncCall using the result location inside the frame" { | 1124 | test "@asyncCall using the result location inside the frame" { |
| 1125 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1125 | if (true) return error.SkipZigTest; // TODO |
| 1126 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1126 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1127 | 1127 | ||
| 1128 | const S = struct { | 1128 | const S = struct { |
| ... | @@ -1152,7 +1152,7 @@ test "@asyncCall using the result location inside the frame" { | ... | @@ -1152,7 +1152,7 @@ test "@asyncCall using the result location inside the frame" { |
| 1152 | } | 1152 | } |
| 1153 | 1153 | ||
| 1154 | test "@TypeOf an async function call of generic fn with error union type" { | 1154 | test "@TypeOf an async function call of generic fn with error union type" { |
| 1155 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1155 | if (true) return error.SkipZigTest; // TODO |
| 1156 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1156 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1157 | 1157 | ||
| 1158 | const S = struct { | 1158 | const S = struct { |
| ... | @@ -1166,7 +1166,7 @@ test "@TypeOf an async function call of generic fn with error union type" { | ... | @@ -1166,7 +1166,7 @@ test "@TypeOf an async function call of generic fn with error union type" { |
| 1166 | } | 1166 | } |
| 1167 | 1167 | ||
| 1168 | test "using @TypeOf on a generic function call" { | 1168 | test "using @TypeOf on a generic function call" { |
| 1169 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1169 | if (true) return error.SkipZigTest; // TODO |
| 1170 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1170 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1171 | 1171 | ||
| 1172 | const S = struct { | 1172 | const S = struct { |
| ... | @@ -1194,7 +1194,7 @@ test "using @TypeOf on a generic function call" { | ... | @@ -1194,7 +1194,7 @@ test "using @TypeOf on a generic function call" { |
| 1194 | } | 1194 | } |
| 1195 | 1195 | ||
| 1196 | test "recursive call of await @asyncCall with struct return type" { | 1196 | test "recursive call of await @asyncCall with struct return type" { |
| 1197 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1197 | if (true) return error.SkipZigTest; // TODO |
| 1198 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1198 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1199 | 1199 | ||
| 1200 | const S = struct { | 1200 | const S = struct { |
| ... | @@ -1233,7 +1233,7 @@ test "recursive call of await @asyncCall with struct return type" { | ... | @@ -1233,7 +1233,7 @@ test "recursive call of await @asyncCall with struct return type" { |
| 1233 | } | 1233 | } |
| 1234 | 1234 | ||
| 1235 | test "nosuspend function call" { | 1235 | test "nosuspend function call" { |
| 1236 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1236 | if (true) return error.SkipZigTest; // TODO |
| 1237 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1237 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1238 | 1238 | ||
| 1239 | const S = struct { | 1239 | const S = struct { |
| ... | @@ -1252,7 +1252,7 @@ test "nosuspend function call" { | ... | @@ -1252,7 +1252,7 @@ test "nosuspend function call" { |
| 1252 | } | 1252 | } |
| 1253 | 1253 | ||
| 1254 | test "await used in expression and awaiting fn with no suspend but async calling convention" { | 1254 | test "await used in expression and awaiting fn with no suspend but async calling convention" { |
| 1255 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1255 | if (true) return error.SkipZigTest; // TODO |
| 1256 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1256 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1257 | 1257 | ||
| 1258 | const S = struct { | 1258 | const S = struct { |
| ... | @@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling | ... | @@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling |
| 1271 | } | 1271 | } |
| 1272 | 1272 | ||
| 1273 | test "await used in expression after a fn call" { | 1273 | test "await used in expression after a fn call" { |
| 1274 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1274 | if (true) return error.SkipZigTest; // TODO |
| 1275 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1275 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1276 | 1276 | ||
| 1277 | const S = struct { | 1277 | const S = struct { |
| ... | @@ -1292,7 +1292,7 @@ test "await used in expression after a fn call" { | ... | @@ -1292,7 +1292,7 @@ test "await used in expression after a fn call" { |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | test "async fn call used in expression after a fn call" { | 1294 | test "async fn call used in expression after a fn call" { |
| 1295 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1295 | if (true) return error.SkipZigTest; // TODO |
| 1296 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1296 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1297 | 1297 | ||
| 1298 | const S = struct { | 1298 | const S = struct { |
| ... | @@ -1312,7 +1312,7 @@ test "async fn call used in expression after a fn call" { | ... | @@ -1312,7 +1312,7 @@ test "async fn call used in expression after a fn call" { |
| 1312 | } | 1312 | } |
| 1313 | 1313 | ||
| 1314 | test "suspend in for loop" { | 1314 | test "suspend in for loop" { |
| 1315 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1315 | if (true) return error.SkipZigTest; // TODO |
| 1316 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1316 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1317 | 1317 | ||
| 1318 | const S = struct { | 1318 | const S = struct { |
| ... | @@ -1341,7 +1341,7 @@ test "suspend in for loop" { | ... | @@ -1341,7 +1341,7 @@ test "suspend in for loop" { |
| 1341 | } | 1341 | } |
| 1342 | 1342 | ||
| 1343 | test "suspend in while loop" { | 1343 | test "suspend in while loop" { |
| 1344 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1344 | if (true) return error.SkipZigTest; // TODO |
| 1345 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1345 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1346 | 1346 | ||
| 1347 | const S = struct { | 1347 | const S = struct { |
| ... | @@ -1381,7 +1381,7 @@ test "suspend in while loop" { | ... | @@ -1381,7 +1381,7 @@ test "suspend in while loop" { |
| 1381 | } | 1381 | } |
| 1382 | 1382 | ||
| 1383 | test "correctly spill when returning the error union result of another async fn" { | 1383 | test "correctly spill when returning the error union result of another async fn" { |
| 1384 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1384 | if (true) return error.SkipZigTest; // TODO |
| 1385 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1385 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1386 | 1386 | ||
| 1387 | const S = struct { | 1387 | const S = struct { |
| ... | @@ -1407,7 +1407,7 @@ test "correctly spill when returning the error union result of another async fn" | ... | @@ -1407,7 +1407,7 @@ test "correctly spill when returning the error union result of another async fn" |
| 1407 | } | 1407 | } |
| 1408 | 1408 | ||
| 1409 | test "spill target expr in a for loop" { | 1409 | test "spill target expr in a for loop" { |
| 1410 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1410 | if (true) return error.SkipZigTest; // TODO |
| 1411 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1411 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1412 | 1412 | ||
| 1413 | const S = struct { | 1413 | const S = struct { |
| ... | @@ -1441,7 +1441,7 @@ test "spill target expr in a for loop" { | ... | @@ -1441,7 +1441,7 @@ test "spill target expr in a for loop" { |
| 1441 | } | 1441 | } |
| 1442 | 1442 | ||
| 1443 | test "spill target expr in a for loop, with a var decl in the loop body" { | 1443 | test "spill target expr in a for loop, with a var decl in the loop body" { |
| 1444 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1444 | if (true) return error.SkipZigTest; // TODO |
| 1445 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1445 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1446 | 1446 | ||
| 1447 | const S = struct { | 1447 | const S = struct { |
| ... | @@ -1480,7 +1480,7 @@ test "spill target expr in a for loop, with a var decl in the loop body" { | ... | @@ -1480,7 +1480,7 @@ test "spill target expr in a for loop, with a var decl in the loop body" { |
| 1480 | } | 1480 | } |
| 1481 | 1481 | ||
| 1482 | test "async call with @call" { | 1482 | test "async call with @call" { |
| 1483 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1483 | if (true) return error.SkipZigTest; // TODO |
| 1484 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1484 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1485 | 1485 | ||
| 1486 | const S = struct { | 1486 | const S = struct { |
| ... | @@ -1505,7 +1505,7 @@ test "async call with @call" { | ... | @@ -1505,7 +1505,7 @@ test "async call with @call" { |
| 1505 | } | 1505 | } |
| 1506 | 1506 | ||
| 1507 | test "async function passed 0-bit arg after non-0-bit arg" { | 1507 | test "async function passed 0-bit arg after non-0-bit arg" { |
| 1508 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1508 | if (true) return error.SkipZigTest; // TODO |
| 1509 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1509 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1510 | 1510 | ||
| 1511 | const S = struct { | 1511 | const S = struct { |
| ... | @@ -1529,7 +1529,7 @@ test "async function passed 0-bit arg after non-0-bit arg" { | ... | @@ -1529,7 +1529,7 @@ test "async function passed 0-bit arg after non-0-bit arg" { |
| 1529 | } | 1529 | } |
| 1530 | 1530 | ||
| 1531 | test "async function passed align(16) arg after align(8) arg" { | 1531 | test "async function passed align(16) arg after align(8) arg" { |
| 1532 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1532 | if (true) return error.SkipZigTest; // TODO |
| 1533 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1533 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1534 | 1534 | ||
| 1535 | const S = struct { | 1535 | const S = struct { |
| ... | @@ -1554,7 +1554,7 @@ test "async function passed align(16) arg after align(8) arg" { | ... | @@ -1554,7 +1554,7 @@ test "async function passed align(16) arg after align(8) arg" { |
| 1554 | } | 1554 | } |
| 1555 | 1555 | ||
| 1556 | test "async function call resolves target fn frame, comptime func" { | 1556 | test "async function call resolves target fn frame, comptime func" { |
| 1557 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1557 | if (true) return error.SkipZigTest; // TODO |
| 1558 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1558 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1559 | 1559 | ||
| 1560 | const S = struct { | 1560 | const S = struct { |
| ... | @@ -1579,7 +1579,7 @@ test "async function call resolves target fn frame, comptime func" { | ... | @@ -1579,7 +1579,7 @@ test "async function call resolves target fn frame, comptime func" { |
| 1579 | } | 1579 | } |
| 1580 | 1580 | ||
| 1581 | test "async function call resolves target fn frame, runtime func" { | 1581 | test "async function call resolves target fn frame, runtime func" { |
| 1582 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1582 | if (true) return error.SkipZigTest; // TODO |
| 1583 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1583 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1584 | 1584 | ||
| 1585 | const S = struct { | 1585 | const S = struct { |
| ... | @@ -1605,7 +1605,7 @@ test "async function call resolves target fn frame, runtime func" { | ... | @@ -1605,7 +1605,7 @@ test "async function call resolves target fn frame, runtime func" { |
| 1605 | } | 1605 | } |
| 1606 | 1606 | ||
| 1607 | test "properly spill optional payload capture value" { | 1607 | test "properly spill optional payload capture value" { |
| 1608 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1608 | if (true) return error.SkipZigTest; // TODO |
| 1609 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1609 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1610 | 1610 | ||
| 1611 | const S = struct { | 1611 | const S = struct { |
| ... | @@ -1632,7 +1632,7 @@ test "properly spill optional payload capture value" { | ... | @@ -1632,7 +1632,7 @@ test "properly spill optional payload capture value" { |
| 1632 | } | 1632 | } |
| 1633 | 1633 | ||
| 1634 | test "handle defer interfering with return value spill" { | 1634 | test "handle defer interfering with return value spill" { |
| 1635 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1635 | if (true) return error.SkipZigTest; // TODO |
| 1636 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1636 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1637 | 1637 | ||
| 1638 | const S = struct { | 1638 | const S = struct { |
| ... | @@ -1675,7 +1675,7 @@ test "handle defer interfering with return value spill" { | ... | @@ -1675,7 +1675,7 @@ test "handle defer interfering with return value spill" { |
| 1675 | } | 1675 | } |
| 1676 | 1676 | ||
| 1677 | test "take address of temporary async frame" { | 1677 | test "take address of temporary async frame" { |
| 1678 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1678 | if (true) return error.SkipZigTest; // TODO |
| 1679 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1679 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1680 | 1680 | ||
| 1681 | const S = struct { | 1681 | const S = struct { |
| ... | @@ -1707,7 +1707,7 @@ test "take address of temporary async frame" { | ... | @@ -1707,7 +1707,7 @@ test "take address of temporary async frame" { |
| 1707 | } | 1707 | } |
| 1708 | 1708 | ||
| 1709 | test "nosuspend await" { | 1709 | test "nosuspend await" { |
| 1710 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1710 | if (true) return error.SkipZigTest; // TODO |
| 1711 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1711 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1712 | 1712 | ||
| 1713 | const S = struct { | 1713 | const S = struct { |
| ... | @@ -1731,7 +1731,7 @@ test "nosuspend await" { | ... | @@ -1731,7 +1731,7 @@ test "nosuspend await" { |
| 1731 | } | 1731 | } |
| 1732 | 1732 | ||
| 1733 | test "nosuspend on function calls" { | 1733 | test "nosuspend on function calls" { |
| 1734 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1734 | if (true) return error.SkipZigTest; // TODO |
| 1735 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1735 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1736 | 1736 | ||
| 1737 | const S0 = struct { | 1737 | const S0 = struct { |
| ... | @@ -1750,7 +1750,7 @@ test "nosuspend on function calls" { | ... | @@ -1750,7 +1750,7 @@ test "nosuspend on function calls" { |
| 1750 | } | 1750 | } |
| 1751 | 1751 | ||
| 1752 | test "nosuspend on async function calls" { | 1752 | test "nosuspend on async function calls" { |
| 1753 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1753 | if (true) return error.SkipZigTest; // TODO |
| 1754 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1754 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1755 | 1755 | ||
| 1756 | const S0 = struct { | 1756 | const S0 = struct { |
| ... | @@ -1771,7 +1771,7 @@ test "nosuspend on async function calls" { | ... | @@ -1771,7 +1771,7 @@ test "nosuspend on async function calls" { |
| 1771 | } | 1771 | } |
| 1772 | 1772 | ||
| 1773 | // test "resume nosuspend async function calls" { | 1773 | // test "resume nosuspend async function calls" { |
| 1774 | // if (builtin.zig_backend != .stage1) return error.SkipZigTest; // if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1774 | // if (true) return error.SkipZigTest; // if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1775 | // const S0 = struct { | 1775 | // const S0 = struct { |
| 1776 | // b: i32 = 42, | 1776 | // b: i32 = 42, |
| 1777 | // }; | 1777 | // }; |
| ... | @@ -1794,7 +1794,7 @@ test "nosuspend on async function calls" { | ... | @@ -1794,7 +1794,7 @@ test "nosuspend on async function calls" { |
| 1794 | // } | 1794 | // } |
| 1795 | 1795 | ||
| 1796 | test "nosuspend resume async function calls" { | 1796 | test "nosuspend resume async function calls" { |
| 1797 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1797 | if (true) return error.SkipZigTest; // TODO |
| 1798 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1798 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1799 | 1799 | ||
| 1800 | const S0 = struct { | 1800 | const S0 = struct { |
| ... | @@ -1819,7 +1819,7 @@ test "nosuspend resume async function calls" { | ... | @@ -1819,7 +1819,7 @@ test "nosuspend resume async function calls" { |
| 1819 | } | 1819 | } |
| 1820 | 1820 | ||
| 1821 | test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { | 1821 | test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { |
| 1822 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1822 | if (true) return error.SkipZigTest; // TODO |
| 1823 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1823 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1824 | 1824 | ||
| 1825 | const S = struct { | 1825 | const S = struct { |
| ... | @@ -1838,7 +1838,7 @@ test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { | ... | @@ -1838,7 +1838,7 @@ test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { |
| 1838 | } | 1838 | } |
| 1839 | 1839 | ||
| 1840 | test "@asyncCall with pass-by-value arguments" { | 1840 | test "@asyncCall with pass-by-value arguments" { |
| 1841 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1841 | if (true) return error.SkipZigTest; // TODO |
| 1842 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1842 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1843 | 1843 | ||
| 1844 | const F0: u64 = 0xbeefbeefbeefbeef; | 1844 | const F0: u64 = 0xbeefbeefbeefbeef; |
| ... | @@ -1874,7 +1874,7 @@ test "@asyncCall with pass-by-value arguments" { | ... | @@ -1874,7 +1874,7 @@ test "@asyncCall with pass-by-value arguments" { |
| 1874 | } | 1874 | } |
| 1875 | 1875 | ||
| 1876 | test "@asyncCall with arguments having non-standard alignment" { | 1876 | test "@asyncCall with arguments having non-standard alignment" { |
| 1877 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 1877 | if (true) return error.SkipZigTest; // TODO |
| 1878 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO | 1878 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1879 | 1879 | ||
| 1880 | const F0: u64 = 0xbeefbeef; | 1880 | const F0: u64 = 0xbeefbeef; |
test/behavior/atomics.zig+3-5| ... | @@ -151,9 +151,7 @@ test "cmpxchg on a global variable" { | ... | @@ -151,9 +151,7 @@ test "cmpxchg on a global variable" { |
| 151 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 151 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 152 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 152 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 153 | 153 | ||
| 154 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 154 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 155 | builtin.cpu.arch == .aarch64) | ||
| 156 | { | ||
| 157 | // https://github.com/ziglang/zig/issues/10627 | 155 | // https://github.com/ziglang/zig/issues/10627 |
| 158 | return error.SkipZigTest; | 156 | return error.SkipZigTest; |
| 159 | } | 157 | } |
| ... | @@ -220,8 +218,8 @@ test "atomicrmw with floats" { | ... | @@ -220,8 +218,8 @@ test "atomicrmw with floats" { |
| 220 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 218 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 221 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 219 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 222 | 220 | ||
| 223 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm or | 221 | if ((builtin.zig_backend == .stage2_llvm or builtin.zig_backend == .stage2_c) and |
| 224 | builtin.zig_backend == .stage2_c) and builtin.cpu.arch == .aarch64) | 222 | builtin.cpu.arch == .aarch64) |
| 225 | { | 223 | { |
| 226 | // https://github.com/ziglang/zig/issues/10627 | 224 | // https://github.com/ziglang/zig/issues/10627 |
| 227 | return error.SkipZigTest; | 225 | return error.SkipZigTest; |
test/behavior/await_struct.zig+1-1| ... | @@ -10,7 +10,7 @@ var await_a_promise: anyframe = undefined; | ... | @@ -10,7 +10,7 @@ var await_a_promise: anyframe = undefined; |
| 10 | var await_final_result = Foo{ .x = 0 }; | 10 | var await_final_result = Foo{ .x = 0 }; |
| 11 | 11 | ||
| 12 | test "coroutine await struct" { | 12 | test "coroutine await struct" { |
| 13 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 13 | if (true) return error.SkipZigTest; // TODO |
| 14 | 14 | ||
| 15 | await_seq('a'); | 15 | await_seq('a'); |
| 16 | var p = async await_amain(); | 16 | var p = async await_amain(); |
test/behavior/basic.zig+1-19| ... | @@ -198,11 +198,6 @@ const OpaqueA = opaque {}; | ... | @@ -198,11 +198,6 @@ const OpaqueA = opaque {}; |
| 198 | const OpaqueB = opaque {}; | 198 | const OpaqueB = opaque {}; |
| 199 | 199 | ||
| 200 | test "opaque types" { | 200 | test "opaque types" { |
| 201 | if (builtin.zig_backend == .stage1) { | ||
| 202 | // stage1 gets the type names wrong | ||
| 203 | return error.SkipZigTest; | ||
| 204 | } | ||
| 205 | |||
| 206 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 201 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 207 | 202 | ||
| 208 | try expect(*OpaqueA != *OpaqueB); | 203 | try expect(*OpaqueA != *OpaqueB); |
| ... | @@ -290,7 +285,6 @@ fn fB() []const u8 { | ... | @@ -290,7 +285,6 @@ fn fB() []const u8 { |
| 290 | 285 | ||
| 291 | test "call function pointer in struct" { | 286 | test "call function pointer in struct" { |
| 292 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 287 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 293 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 294 | 288 | ||
| 295 | try expect(mem.eql(u8, f3(true), "a")); | 289 | try expect(mem.eql(u8, f3(true), "a")); |
| 296 | try expect(mem.eql(u8, f3(false), "b")); | 290 | try expect(mem.eql(u8, f3(false), "b")); |
| ... | @@ -329,7 +323,6 @@ fn copy(src: *const u64, dst: *u64) void { | ... | @@ -329,7 +323,6 @@ fn copy(src: *const u64, dst: *u64) void { |
| 329 | } | 323 | } |
| 330 | 324 | ||
| 331 | test "call result of if else expression" { | 325 | test "call result of if else expression" { |
| 332 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers | ||
| 333 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 326 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 334 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 327 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 335 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 328 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -573,22 +566,16 @@ fn emptyFn() void {} | ... | @@ -573,22 +566,16 @@ fn emptyFn() void {} |
| 573 | 566 | ||
| 574 | const addr1 = @ptrCast(*const u8, &emptyFn); | 567 | const addr1 = @ptrCast(*const u8, &emptyFn); |
| 575 | test "comptime cast fn to ptr" { | 568 | test "comptime cast fn to ptr" { |
| 576 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 577 | |||
| 578 | const addr2 = @ptrCast(*const u8, &emptyFn); | 569 | const addr2 = @ptrCast(*const u8, &emptyFn); |
| 579 | comptime try expect(addr1 == addr2); | 570 | comptime try expect(addr1 == addr2); |
| 580 | } | 571 | } |
| 581 | 572 | ||
| 582 | test "equality compare fn ptrs" { | 573 | test "equality compare fn ptrs" { |
| 583 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 584 | |||
| 585 | var a = &emptyFn; | 574 | var a = &emptyFn; |
| 586 | try expect(a == a); | 575 | try expect(a == a); |
| 587 | } | 576 | } |
| 588 | 577 | ||
| 589 | test "self reference through fn ptr field" { | 578 | test "self reference through fn ptr field" { |
| 590 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 591 | |||
| 592 | const S = struct { | 579 | const S = struct { |
| 593 | const A = struct { | 580 | const A = struct { |
| 594 | f: *const fn (A) u8, | 581 | f: *const fn (A) u8, |
| ... | @@ -783,10 +770,6 @@ test "auto created variables have correct alignment" { | ... | @@ -783,10 +770,6 @@ test "auto created variables have correct alignment" { |
| 783 | } | 770 | } |
| 784 | 771 | ||
| 785 | test "extern variable with non-pointer opaque type" { | 772 | test "extern variable with non-pointer opaque type" { |
| 786 | if (builtin.zig_backend == .stage1) { | ||
| 787 | // Regressed with LLVM 14 | ||
| 788 | return error.SkipZigTest; | ||
| 789 | } | ||
| 790 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 773 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 791 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 774 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 792 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 775 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -963,7 +946,7 @@ test "array type comes from generic function" { | ... | @@ -963,7 +946,7 @@ test "array type comes from generic function" { |
| 963 | } | 946 | } |
| 964 | 947 | ||
| 965 | test "generic function uses return type of other generic function" { | 948 | test "generic function uses return type of other generic function" { |
| 966 | if (builtin.zig_backend != .stage1) { | 949 | if (true) { |
| 967 | // This test has been failing sporadically on the CI. | 950 | // This test has been failing sporadically on the CI. |
| 968 | // It's not enough to verify that it works locally; we need to diagnose why | 951 | // It's not enough to verify that it works locally; we need to diagnose why |
| 969 | // it fails on the CI sometimes before turning it back on. | 952 | // it fails on the CI sometimes before turning it back on. |
| ... | @@ -1067,7 +1050,6 @@ test "inline call of function with a switch inside the return statement" { | ... | @@ -1067,7 +1050,6 @@ test "inline call of function with a switch inside the return statement" { |
| 1067 | } | 1050 | } |
| 1068 | 1051 | ||
| 1069 | test "namespace lookup ignores decl causing the lookup" { | 1052 | test "namespace lookup ignores decl causing the lookup" { |
| 1070 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1071 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1053 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1072 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1054 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1073 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1055 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/bitcast.zig+1-7| ... | @@ -155,10 +155,6 @@ test "bitcast generates a temporary value" { | ... | @@ -155,10 +155,6 @@ test "bitcast generates a temporary value" { |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | test "@bitCast packed structs at runtime and comptime" { | 157 | test "@bitCast packed structs at runtime and comptime" { |
| 158 | if (builtin.zig_backend == .stage1) { | ||
| 159 | // stage1 gets the wrong answer for a lot of targets | ||
| 160 | return error.SkipZigTest; | ||
| 161 | } | ||
| 162 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 158 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 163 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 159 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 164 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 160 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -323,7 +319,6 @@ test "@bitCast packed struct of floats" { | ... | @@ -323,7 +319,6 @@ test "@bitCast packed struct of floats" { |
| 323 | } | 319 | } |
| 324 | 320 | ||
| 325 | test "comptime @bitCast packed struct to int and back" { | 321 | test "comptime @bitCast packed struct to int and back" { |
| 326 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 327 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 322 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 328 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 323 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 329 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 324 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -377,8 +372,7 @@ test "comptime bitcast with fields following f80" { | ... | @@ -377,8 +372,7 @@ test "comptime bitcast with fields following f80" { |
| 377 | } | 372 | } |
| 378 | 373 | ||
| 379 | test "bitcast vector to integer and back" { | 374 | test "bitcast vector to integer and back" { |
| 380 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO: https://github.com/ziglang/zig/issues/13220 | 375 | if (true) return error.SkipZigTest; // TODO: https://github.com/ziglang/zig/issues/13220 |
| 381 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the comptime cast wrong | ||
| 382 | 376 | ||
| 383 | const arr: [16]bool = [_]bool{ true, false } ++ [_]bool{true} ** 14; | 377 | const arr: [16]bool = [_]bool{ true, false } ++ [_]bool{true} ** 14; |
| 384 | var x = @splat(16, true); | 378 | var x = @splat(16, true); |
test/behavior/bitreverse.zig-6| ... | @@ -5,8 +5,6 @@ const minInt = std.math.minInt; | ... | @@ -5,8 +5,6 @@ const minInt = std.math.minInt; |
| 5 | 5 | ||
| 6 | test "@bitReverse large exotic integer" { | 6 | test "@bitReverse large exotic integer" { |
| 7 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 7 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 8 | // Currently failing on stage1 for big-endian targets | ||
| 9 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 10 | 8 | ||
| 11 | try expect(@bitReverse(@as(u95, 0x123456789abcdef111213141)) == 0x4146424447bd9eac8f351624); | 9 | try expect(@bitReverse(@as(u95, 0x123456789abcdef111213141)) == 0x4146424447bd9eac8f351624); |
| 12 | } | 10 | } |
| ... | @@ -96,7 +94,6 @@ fn vector8() !void { | ... | @@ -96,7 +94,6 @@ fn vector8() !void { |
| 96 | } | 94 | } |
| 97 | 95 | ||
| 98 | test "bitReverse vectors u8" { | 96 | test "bitReverse vectors u8" { |
| 99 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 100 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 97 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 101 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 98 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 102 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -115,7 +112,6 @@ fn vector16() !void { | ... | @@ -115,7 +112,6 @@ fn vector16() !void { |
| 115 | } | 112 | } |
| 116 | 113 | ||
| 117 | test "bitReverse vectors u16" { | 114 | test "bitReverse vectors u16" { |
| 118 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 119 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 115 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 120 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 116 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 121 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 117 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -134,7 +130,6 @@ fn vector24() !void { | ... | @@ -134,7 +130,6 @@ fn vector24() !void { |
| 134 | } | 130 | } |
| 135 | 131 | ||
| 136 | test "bitReverse vectors u24" { | 132 | test "bitReverse vectors u24" { |
| 137 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 138 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 133 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 139 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 134 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 140 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 135 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -153,7 +148,6 @@ fn vector0() !void { | ... | @@ -153,7 +148,6 @@ fn vector0() !void { |
| 153 | } | 148 | } |
| 154 | 149 | ||
| 155 | test "bitReverse vectors u0" { | 150 | test "bitReverse vectors u0" { |
| 156 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 157 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 151 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 158 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 152 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 159 | 153 |
test/behavior/bugs/10147.zig+1-4| ... | @@ -1,8 +1,7 @@ | ... | @@ -1,8 +1,7 @@ |
| 1 | const builtin = @import("builtin"); | 1 | const builtin = @import("builtin"); |
| 2 | const std = @import("std"); | 2 | const std = @import("std"); |
| 3 | 3 | ||
| 4 | test "uses correct LLVM builtin" { | 4 | test "test calling @clz on both vector and scalar inputs" { |
| 5 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 6 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 5 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 7 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 6 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 7 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -11,8 +10,6 @@ test "uses correct LLVM builtin" { | ... | @@ -11,8 +10,6 @@ test "uses correct LLVM builtin" { |
| 11 | 10 | ||
| 12 | var x: u32 = 0x1; | 11 | var x: u32 = 0x1; |
| 13 | var y: @Vector(4, u32) = [_]u32{ 0x1, 0x1, 0x1, 0x1 }; | 12 | var y: @Vector(4, u32) = [_]u32{ 0x1, 0x1, 0x1, 0x1 }; |
| 14 | // The stage1 compiler used to call the same builtin function for both | ||
| 15 | // scalar and vector inputs, causing the LLVM module verification to fail. | ||
| 16 | var a = @clz(x); | 13 | var a = @clz(x); |
| 17 | var b = @clz(y); | 14 | var b = @clz(y); |
| 18 | try std.testing.expectEqual(@as(u6, 31), a); | 15 | try std.testing.expectEqual(@as(u6, 31), a); |
test/behavior/bugs/11159.zig-2| ... | @@ -8,8 +8,6 @@ test { | ... | @@ -8,8 +8,6 @@ test { |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | test { | 10 | test { |
| 11 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | ||
| 12 | |||
| 13 | const S = struct { | 11 | const S = struct { |
| 14 | comptime x: i32 = 0, | 12 | comptime x: i32 = 0, |
| 15 | comptime y: u32 = 0, | 13 | comptime y: u32 = 0, |
test/behavior/bugs/11162.zig+2-3| ... | @@ -2,9 +2,8 @@ const std = @import("std"); | ... | @@ -2,9 +2,8 @@ const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | 2 | const builtin = @import("builtin"); |
| 3 | const expect = std.testing.expect; | 3 | const expect = std.testing.expect; |
| 4 | 4 | ||
| 5 | test "aggregate initializers should allow initializing comptime fields, verifying equality (stage2 only)" { | 5 | test "aggregate initializers should allow initializing comptime fields, verifying equality" { |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | 6 | if (true) return error.SkipZigTest; // TODO |
| 7 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | ||
| 8 | 7 | ||
| 9 | var x: u32 = 15; | 8 | var x: u32 = 15; |
| 10 | const T = @TypeOf(.{ @as(i32, -1234), @as(u32, 5678), x }); | 9 | const T = @TypeOf(.{ @as(i32, -1234), @as(u32, 5678), x }); |
test/behavior/bugs/11227.zig-2| ... | @@ -6,8 +6,6 @@ fn foo() u32 { | ... | @@ -6,8 +6,6 @@ fn foo() u32 { |
| 6 | } | 6 | } |
| 7 | const bar = foo; | 7 | const bar = foo; |
| 8 | test "pointer to alias behaves same as pointer to function" { | 8 | test "pointer to alias behaves same as pointer to function" { |
| 9 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers | ||
| 10 | |||
| 11 | var a = &bar; | 9 | var a = &bar; |
| 12 | try std.testing.expect(foo() == a()); | 10 | try std.testing.expect(foo() == a()); |
| 13 | } | 11 | } |
test/behavior/bugs/11816.zig-1| ... | @@ -3,7 +3,6 @@ const builtin = @import("builtin"); | ... | @@ -3,7 +3,6 @@ const builtin = @import("builtin"); |
| 3 | 3 | ||
| 4 | test { | 4 | test { |
| 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 7 | 6 | ||
| 8 | var x: u32 = 3; | 7 | var x: u32 = 3; |
| 9 | const val: usize = while (true) switch (x) { | 8 | const val: usize = while (true) switch (x) { |
test/behavior/bugs/12486.zig-2| ... | @@ -23,8 +23,6 @@ const ErrStruct = struct { | ... | @@ -23,8 +23,6 @@ const ErrStruct = struct { |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | test { | 25 | test { |
| 26 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 27 | |||
| 28 | _ = OptEnum{ | 26 | _ = OptEnum{ |
| 29 | .opt_enum = .{ | 27 | .opt_enum = .{ |
| 30 | .EnumVariant = 1, | 28 | .EnumVariant = 1, |
test/behavior/bugs/12723.zig-3| ... | @@ -1,8 +1,5 @@ | ... | @@ -1,8 +1,5 @@ |
| 1 | const expect = @import("std").testing.expect; | 1 | const expect = @import("std").testing.expect; |
| 2 | 2 | ||
| 3 | // This test causes a compile error on stage1 regardless of whether | ||
| 4 | // the body of the test is comptime-gated or not. To workaround this, | ||
| 5 | // we gate the inclusion of the test file. | ||
| 6 | test "Non-exhaustive enum backed by comptime_int" { | 3 | test "Non-exhaustive enum backed by comptime_int" { |
| 7 | const E = enum(comptime_int) { a, b, c, _ }; | 4 | const E = enum(comptime_int) { a, b, c, _ }; |
| 8 | comptime var e: E = .a; | 5 | comptime var e: E = .a; |
test/behavior/bugs/1277.zig-1| ... | @@ -12,7 +12,6 @@ fn f() i32 { | ... | @@ -12,7 +12,6 @@ fn f() i32 { |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | test "don't emit an LLVM global for a const function when it's in an optional in a struct" { | 14 | test "don't emit an LLVM global for a const function when it's in an optional in a struct" { |
| 15 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 has different function pointers | ||
| 16 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 17 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 16 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 18 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 17 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/bugs/12801-1.zig-1| ... | @@ -8,7 +8,6 @@ fn capacity_() u64 { | ... | @@ -8,7 +8,6 @@ fn capacity_() u64 { |
| 8 | 8 | ||
| 9 | test { | 9 | test { |
| 10 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 10 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 12 | 11 | ||
| 13 | try std.testing.expect((@This(){}).capacity() == 64); | 12 | try std.testing.expect((@This(){}).capacity() == 64); |
| 14 | } | 13 | } |
test/behavior/bugs/12801-2.zig-1| ... | @@ -14,7 +14,6 @@ const Auto = struct { | ... | @@ -14,7 +14,6 @@ const Auto = struct { |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | test { | 16 | test { |
| 17 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 18 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 17 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 19 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 18 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 20 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 19 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/bugs/12885.zig-2| ... | @@ -11,8 +11,6 @@ const Foo = @Type(.{ | ... | @@ -11,8 +11,6 @@ const Foo = @Type(.{ |
| 11 | .ErrorSet = &info.args, | 11 | .ErrorSet = &info.args, |
| 12 | }); | 12 | }); |
| 13 | test "ErrorSet comptime_field_ptr" { | 13 | test "ErrorSet comptime_field_ptr" { |
| 14 | if (@import("builtin").zig_backend == .stage1) return error.SkipZigTest; | ||
| 15 | |||
| 16 | try expect(Foo == error{bar}); | 14 | try expect(Foo == error{bar}); |
| 17 | } | 15 | } |
| 18 | 16 |
test/behavior/bugs/12891.zig-2| ... | @@ -7,8 +7,6 @@ test "issue12891" { | ... | @@ -7,8 +7,6 @@ test "issue12891" { |
| 7 | try std.testing.expect(i < f); | 7 | try std.testing.expect(i < f); |
| 8 | } | 8 | } |
| 9 | test "nan" { | 9 | test "nan" { |
| 10 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | ||
| 11 | |||
| 12 | const f = comptime std.math.nan(f64); | 10 | const f = comptime std.math.nan(f64); |
| 13 | var i: usize = 0; | 11 | var i: usize = 0; |
| 14 | try std.testing.expect(!(f < i)); | 12 | try std.testing.expect(!(f < i)); |
test/behavior/bugs/12911.zig-2| ... | @@ -5,7 +5,5 @@ const Thing = struct { | ... | @@ -5,7 +5,5 @@ const Thing = struct { |
| 5 | array: [1]Item, | 5 | array: [1]Item, |
| 6 | }; | 6 | }; |
| 7 | test { | 7 | test { |
| 8 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 9 | |||
| 10 | _ = Thing{ .array = undefined }; | 8 | _ = Thing{ .array = undefined }; |
| 11 | } | 9 | } |
test/behavior/bugs/1310.zig+1-2| ... | @@ -22,7 +22,6 @@ fn agent_callback(_vm: [*]VM, options: [*]u8) callconv(.C) i32 { | ... | @@ -22,7 +22,6 @@ fn agent_callback(_vm: [*]VM, options: [*]u8) callconv(.C) i32 { |
| 22 | return 11; | 22 | return 11; |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | test "fixed" { | 25 | test { |
| 26 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 27 | try expect(agent_callback(undefined, undefined) == 11); | 26 | try expect(agent_callback(undefined, undefined) == 11); |
| 28 | } | 27 | } |
test/behavior/bugs/2006.zig+1-8| ... | @@ -9,12 +9,5 @@ test "bug 2006" { | ... | @@ -9,12 +9,5 @@ test "bug 2006" { |
| 9 | var a: S = undefined; | 9 | var a: S = undefined; |
| 10 | a = S{ .p = undefined }; | 10 | a = S{ .p = undefined }; |
| 11 | try expect(@sizeOf(S) != 0); | 11 | try expect(@sizeOf(S) != 0); |
| 12 | if (@import("builtin").zig_backend != .stage1) { | 12 | try expect(@sizeOf(*void) == @sizeOf(*i32)); |
| 13 | // It is an accepted proposal to make `@sizeOf` for pointers independent | ||
| 14 | // of whether the element type is zero bits. | ||
| 15 | // This language change has not been implemented in stage1. | ||
| 16 | try expect(@sizeOf(*void) == @sizeOf(*i32)); | ||
| 17 | } else { | ||
| 18 | try expect(@sizeOf(*void) == 0); | ||
| 19 | } | ||
| 20 | } | 13 | } |
test/behavior/bugs/3112.zig-1| ... | @@ -13,7 +13,6 @@ fn prev(p: ?State) void { | ... | @@ -13,7 +13,6 @@ fn prev(p: ?State) void { |
| 13 | 13 | ||
| 14 | test "zig test crash" { | 14 | test "zig test crash" { |
| 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 15 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 16 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 17 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 16 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 18 | var global: State = undefined; | 17 | var global: State = undefined; |
| 19 | global.enter = prev; | 18 | global.enter = prev; |
test/behavior/bugs/3779.zig-3| ... | @@ -6,7 +6,6 @@ const tag_name = @tagName(TestEnum.TestEnumValue); | ... | @@ -6,7 +6,6 @@ const tag_name = @tagName(TestEnum.TestEnumValue); |
| 6 | const ptr_tag_name: [*:0]const u8 = tag_name; | 6 | const ptr_tag_name: [*:0]const u8 = tag_name; |
| 7 | 7 | ||
| 8 | test "@tagName() returns a string literal" { | 8 | test "@tagName() returns a string literal" { |
| 9 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the type wrong | ||
| 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 11 | 10 | ||
| 12 | try std.testing.expect(*const [13:0]u8 == @TypeOf(tag_name)); | 11 | try std.testing.expect(*const [13:0]u8 == @TypeOf(tag_name)); |
| ... | @@ -19,7 +18,6 @@ const error_name = @errorName(TestError.TestErrorCode); | ... | @@ -19,7 +18,6 @@ const error_name = @errorName(TestError.TestErrorCode); |
| 19 | const ptr_error_name: [*:0]const u8 = error_name; | 18 | const ptr_error_name: [*:0]const u8 = error_name; |
| 20 | 19 | ||
| 21 | test "@errorName() returns a string literal" { | 20 | test "@errorName() returns a string literal" { |
| 22 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the type wrong | ||
| 23 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 21 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 24 | 22 | ||
| 25 | try std.testing.expect(*const [13:0]u8 == @TypeOf(error_name)); | 23 | try std.testing.expect(*const [13:0]u8 == @TypeOf(error_name)); |
| ... | @@ -32,7 +30,6 @@ const type_name = @typeName(TestType); | ... | @@ -32,7 +30,6 @@ const type_name = @typeName(TestType); |
| 32 | const ptr_type_name: [*:0]const u8 = type_name; | 30 | const ptr_type_name: [*:0]const u8 = type_name; |
| 33 | 31 | ||
| 34 | test "@typeName() returns a string literal" { | 32 | test "@typeName() returns a string literal" { |
| 35 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 gets the type wrong | ||
| 36 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 33 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 37 | 34 | ||
| 38 | try std.testing.expect(*const [type_name.len:0]u8 == @TypeOf(type_name)); | 35 | try std.testing.expect(*const [type_name.len:0]u8 == @TypeOf(type_name)); |
test/behavior/bugs/6850.zig+1-7| ... | @@ -8,11 +8,5 @@ test "lazy sizeof comparison with zero" { | ... | @@ -8,11 +8,5 @@ test "lazy sizeof comparison with zero" { |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | fn hasNoBits(comptime T: type) bool { | 10 | fn hasNoBits(comptime T: type) bool { |
| 11 | if (@import("builtin").zig_backend != .stage1) { | 11 | return @sizeOf(T) == @sizeOf(*i32); |
| 12 | // It is an accepted proposal to make `@sizeOf` for pointers independent | ||
| 13 | // of whether the element type is zero bits. | ||
| 14 | // This language change has not been implemented in stage1. | ||
| 15 | return @sizeOf(T) == @sizeOf(*i32); | ||
| 16 | } | ||
| 17 | return @sizeOf(T) == 0; | ||
| 18 | } | 12 | } |
test/behavior/bugs/920.zig+2-11| ... | @@ -2,23 +2,14 @@ const builtin = @import("builtin"); | ... | @@ -2,23 +2,14 @@ const builtin = @import("builtin"); |
| 2 | const std = @import("std"); | 2 | const std = @import("std"); |
| 3 | const Random = std.rand.Random; | 3 | const Random = std.rand.Random; |
| 4 | 4 | ||
| 5 | const zeroCaseFn = switch (builtin.zig_backend) { | ||
| 6 | .stage1 => fn (*Random, f64) f64, | ||
| 7 | else => *const fn (*Random, f64) f64, | ||
| 8 | }; | ||
| 9 | const pdfFn = switch (builtin.zig_backend) { | ||
| 10 | .stage1 => fn (f64) f64, | ||
| 11 | else => *const fn (f64) f64, | ||
| 12 | }; | ||
| 13 | |||
| 14 | const ZigTable = struct { | 5 | const ZigTable = struct { |
| 15 | r: f64, | 6 | r: f64, |
| 16 | x: [257]f64, | 7 | x: [257]f64, |
| 17 | f: [257]f64, | 8 | f: [257]f64, |
| 18 | 9 | ||
| 19 | pdf: pdfFn, | 10 | pdf: *const fn (f64) f64, |
| 20 | is_symmetric: bool, | 11 | is_symmetric: bool, |
| 21 | zero_case: zeroCaseFn, | 12 | zero_case: *const fn (*Random, f64) f64, |
| 22 | }; | 13 | }; |
| 23 | 14 | ||
| 24 | fn ZigTableGen(comptime is_symmetric: bool, comptime r: f64, comptime v: f64, comptime f: fn (f64) f64, comptime f_inv: fn (f64) f64, comptime zero_case: fn (*Random, f64) f64) ZigTable { | 15 | fn ZigTableGen(comptime is_symmetric: bool, comptime r: f64, comptime v: f64, comptime f: fn (f64) f64, comptime f_inv: fn (f64) f64, comptime zero_case: fn (*Random, f64) f64) ZigTable { |
test/behavior/byteswap.zig-5| ... | @@ -3,7 +3,6 @@ const builtin = @import("builtin"); | ... | @@ -3,7 +3,6 @@ const builtin = @import("builtin"); |
| 3 | const expect = std.testing.expect; | 3 | const expect = std.testing.expect; |
| 4 | 4 | ||
| 5 | test "@byteSwap integers" { | 5 | test "@byteSwap integers" { |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 7 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 6 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 8 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 7 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 9 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -62,7 +61,6 @@ fn vector8() !void { | ... | @@ -62,7 +61,6 @@ fn vector8() !void { |
| 62 | } | 61 | } |
| 63 | 62 | ||
| 64 | test "@byteSwap vectors u8" { | 63 | test "@byteSwap vectors u8" { |
| 65 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 66 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 64 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 67 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 65 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 68 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 66 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -81,7 +79,6 @@ fn vector16() !void { | ... | @@ -81,7 +79,6 @@ fn vector16() !void { |
| 81 | } | 79 | } |
| 82 | 80 | ||
| 83 | test "@byteSwap vectors u16" { | 81 | test "@byteSwap vectors u16" { |
| 84 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 85 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 82 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 86 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 83 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 87 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 84 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -100,7 +97,6 @@ fn vector24() !void { | ... | @@ -100,7 +97,6 @@ fn vector24() !void { |
| 100 | } | 97 | } |
| 101 | 98 | ||
| 102 | test "@byteSwap vectors u24" { | 99 | test "@byteSwap vectors u24" { |
| 103 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 104 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 100 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 105 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 101 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 106 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 102 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| ... | @@ -119,7 +115,6 @@ fn vector0() !void { | ... | @@ -119,7 +115,6 @@ fn vector0() !void { |
| 119 | } | 115 | } |
| 120 | 116 | ||
| 121 | test "@byteSwap vectors u0" { | 117 | test "@byteSwap vectors u0" { |
| 122 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 123 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 118 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 124 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 119 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 125 | 120 |
test/behavior/call.zig+4-10| ... | @@ -45,10 +45,7 @@ test "basic invocations" { | ... | @@ -45,10 +45,7 @@ test "basic invocations" { |
| 45 | } | 45 | } |
| 46 | { | 46 | { |
| 47 | // call of non comptime-known function | 47 | // call of non comptime-known function |
| 48 | var alias_foo = switch (builtin.zig_backend) { | 48 | var alias_foo = &foo; |
| 49 | .stage1 => foo, | ||
| 50 | else => &foo, | ||
| 51 | }; | ||
| 52 | try expect(@call(.{ .modifier = .no_async }, alias_foo, .{}) == 1234); | 49 | try expect(@call(.{ .modifier = .no_async }, alias_foo, .{}) == 1234); |
| 53 | try expect(@call(.{ .modifier = .never_tail }, alias_foo, .{}) == 1234); | 50 | try expect(@call(.{ .modifier = .never_tail }, alias_foo, .{}) == 1234); |
| 54 | try expect(@call(.{ .modifier = .never_inline }, alias_foo, .{}) == 1234); | 51 | try expect(@call(.{ .modifier = .never_inline }, alias_foo, .{}) == 1234); |
| ... | @@ -71,7 +68,9 @@ test "tuple parameters" { | ... | @@ -71,7 +68,9 @@ test "tuple parameters" { |
| 71 | try expect(@call(.{}, add, .{ 12, b }) == 46); | 68 | try expect(@call(.{}, add, .{ 12, b }) == 46); |
| 72 | try expect(@call(.{}, add, .{ a, b }) == 46); | 69 | try expect(@call(.{}, add, .{ a, b }) == 46); |
| 73 | try expect(@call(.{}, add, .{ 12, 34 }) == 46); | 70 | try expect(@call(.{}, add, .{ 12, 34 }) == 46); |
| 74 | if (builtin.zig_backend == .stage1) comptime try expect(@call(.{}, add, .{ 12, 34 }) == 46); // TODO | 71 | if (false) { |
| 72 | comptime try expect(@call(.{}, add, .{ 12, 34 }) == 46); // TODO | ||
| 73 | } | ||
| 75 | try expect(comptime @call(.{}, add, .{ 12, 34 }) == 46); | 74 | try expect(comptime @call(.{}, add, .{ 12, 34 }) == 46); |
| 76 | { | 75 | { |
| 77 | const separate_args0 = .{ a, b }; | 76 | const separate_args0 = .{ a, b }; |
| ... | @@ -246,8 +245,6 @@ test "function call with 40 arguments" { | ... | @@ -246,8 +245,6 @@ test "function call with 40 arguments" { |
| 246 | } | 245 | } |
| 247 | 246 | ||
| 248 | test "arguments to comptime parameters generated in comptime blocks" { | 247 | test "arguments to comptime parameters generated in comptime blocks" { |
| 249 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 250 | |||
| 251 | const S = struct { | 248 | const S = struct { |
| 252 | fn fortyTwo() i32 { | 249 | fn fortyTwo() i32 { |
| 253 | return 42; | 250 | return 42; |
| ... | @@ -261,7 +258,6 @@ test "arguments to comptime parameters generated in comptime blocks" { | ... | @@ -261,7 +258,6 @@ test "arguments to comptime parameters generated in comptime blocks" { |
| 261 | } | 258 | } |
| 262 | 259 | ||
| 263 | test "forced tail call" { | 260 | test "forced tail call" { |
| 264 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 265 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 261 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 266 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 262 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 267 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 263 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| ... | @@ -294,7 +290,6 @@ test "forced tail call" { | ... | @@ -294,7 +290,6 @@ test "forced tail call" { |
| 294 | } | 290 | } |
| 295 | 291 | ||
| 296 | test "inline call preserves tail call" { | 292 | test "inline call preserves tail call" { |
| 297 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 298 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 293 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 299 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 294 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 300 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 295 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| ... | @@ -329,7 +324,6 @@ test "inline call preserves tail call" { | ... | @@ -329,7 +324,6 @@ test "inline call preserves tail call" { |
| 329 | } | 324 | } |
| 330 | 325 | ||
| 331 | test "inline call doesn't re-evaluate non generic struct" { | 326 | test "inline call doesn't re-evaluate non generic struct" { |
| 332 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 333 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 327 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 334 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 328 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 335 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 329 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/cast.zig-15| ... | @@ -113,8 +113,6 @@ test "@intToFloat" { | ... | @@ -113,8 +113,6 @@ test "@intToFloat" { |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | test "@intToFloat(f80)" { | 115 | test "@intToFloat(f80)" { |
| 116 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 117 | |||
| 118 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 116 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 119 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 117 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 120 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 118 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -699,11 +697,6 @@ test "peer type resolution: error set supersets" { | ... | @@ -699,11 +697,6 @@ test "peer type resolution: error set supersets" { |
| 699 | } | 697 | } |
| 700 | 698 | ||
| 701 | test "peer type resolution: disjoint error sets" { | 699 | test "peer type resolution: disjoint error sets" { |
| 702 | if (builtin.zig_backend == .stage1) { | ||
| 703 | // stage1 gets the order of the error names wrong after merging the sets. | ||
| 704 | return error.SkipZigTest; | ||
| 705 | } | ||
| 706 | |||
| 707 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 700 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 708 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 701 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 709 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 702 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -733,11 +726,6 @@ test "peer type resolution: disjoint error sets" { | ... | @@ -733,11 +726,6 @@ test "peer type resolution: disjoint error sets" { |
| 733 | } | 726 | } |
| 734 | 727 | ||
| 735 | test "peer type resolution: error union and error set" { | 728 | test "peer type resolution: error union and error set" { |
| 736 | if (builtin.zig_backend == .stage1) { | ||
| 737 | // stage1 gets the order of the error names wrong after merging the sets. | ||
| 738 | return error.SkipZigTest; | ||
| 739 | } | ||
| 740 | |||
| 741 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 729 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 742 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 730 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 743 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 731 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -1080,7 +1068,6 @@ fn incrementVoidPtrArray(array: ?*anyopaque, len: usize) void { | ... | @@ -1080,7 +1068,6 @@ fn incrementVoidPtrArray(array: ?*anyopaque, len: usize) void { |
| 1080 | } | 1068 | } |
| 1081 | 1069 | ||
| 1082 | test "compile time int to ptr of function" { | 1070 | test "compile time int to ptr of function" { |
| 1083 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1084 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1071 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1085 | 1072 | ||
| 1086 | try foobar(FUNCTION_CONSTANT); | 1073 | try foobar(FUNCTION_CONSTANT); |
| ... | @@ -1421,8 +1408,6 @@ test "floatToInt to zero-bit int" { | ... | @@ -1421,8 +1408,6 @@ test "floatToInt to zero-bit int" { |
| 1421 | } | 1408 | } |
| 1422 | 1409 | ||
| 1423 | test "peer type resolution of function pointer and function body" { | 1410 | test "peer type resolution of function pointer and function body" { |
| 1424 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1425 | |||
| 1426 | const T = fn () u32; | 1411 | const T = fn () u32; |
| 1427 | const a: T = undefined; | 1412 | const a: T = undefined; |
| 1428 | const b: *const T = undefined; | 1413 | const b: *const T = undefined; |
test/behavior/comptime_memory.zig+11-32| ... | @@ -4,8 +4,6 @@ const testing = @import("std").testing; | ... | @@ -4,8 +4,6 @@ const testing = @import("std").testing; |
| 4 | const ptr_size = @sizeOf(usize); | 4 | const ptr_size = @sizeOf(usize); |
| 5 | 5 | ||
| 6 | test "type pun signed and unsigned as single pointer" { | 6 | test "type pun signed and unsigned as single pointer" { |
| 7 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 8 | |||
| 9 | comptime { | 7 | comptime { |
| 10 | var x: u32 = 0; | 8 | var x: u32 = 0; |
| 11 | const y = @ptrCast(*i32, &x); | 9 | const y = @ptrCast(*i32, &x); |
| ... | @@ -15,8 +13,6 @@ test "type pun signed and unsigned as single pointer" { | ... | @@ -15,8 +13,6 @@ test "type pun signed and unsigned as single pointer" { |
| 15 | } | 13 | } |
| 16 | 14 | ||
| 17 | test "type pun signed and unsigned as many pointer" { | 15 | test "type pun signed and unsigned as many pointer" { |
| 18 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 19 | |||
| 20 | comptime { | 16 | comptime { |
| 21 | var x: u32 = 0; | 17 | var x: u32 = 0; |
| 22 | const y = @ptrCast([*]i32, &x); | 18 | const y = @ptrCast([*]i32, &x); |
| ... | @@ -26,8 +22,6 @@ test "type pun signed and unsigned as many pointer" { | ... | @@ -26,8 +22,6 @@ test "type pun signed and unsigned as many pointer" { |
| 26 | } | 22 | } |
| 27 | 23 | ||
| 28 | test "type pun signed and unsigned as array pointer" { | 24 | test "type pun signed and unsigned as array pointer" { |
| 29 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 30 | |||
| 31 | comptime { | 25 | comptime { |
| 32 | var x: u32 = 0; | 26 | var x: u32 = 0; |
| 33 | const y = @ptrCast(*[1]i32, &x); | 27 | const y = @ptrCast(*[1]i32, &x); |
| ... | @@ -37,8 +31,7 @@ test "type pun signed and unsigned as array pointer" { | ... | @@ -37,8 +31,7 @@ test "type pun signed and unsigned as array pointer" { |
| 37 | } | 31 | } |
| 38 | 32 | ||
| 39 | test "type pun signed and unsigned as offset many pointer" { | 33 | test "type pun signed and unsigned as offset many pointer" { |
| 40 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 34 | if (true) { |
| 41 | if (builtin.zig_backend != .stage1) { | ||
| 42 | // TODO https://github.com/ziglang/zig/issues/9646 | 35 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 43 | return error.SkipZigTest; | 36 | return error.SkipZigTest; |
| 44 | } | 37 | } |
| ... | @@ -53,8 +46,7 @@ test "type pun signed and unsigned as offset many pointer" { | ... | @@ -53,8 +46,7 @@ test "type pun signed and unsigned as offset many pointer" { |
| 53 | } | 46 | } |
| 54 | 47 | ||
| 55 | test "type pun signed and unsigned as array pointer" { | 48 | test "type pun signed and unsigned as array pointer" { |
| 56 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 49 | if (true) { |
| 57 | if (builtin.zig_backend != .stage1) { | ||
| 58 | // TODO https://github.com/ziglang/zig/issues/9646 | 50 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 59 | return error.SkipZigTest; | 51 | return error.SkipZigTest; |
| 60 | } | 52 | } |
| ... | @@ -69,8 +61,6 @@ test "type pun signed and unsigned as array pointer" { | ... | @@ -69,8 +61,6 @@ test "type pun signed and unsigned as array pointer" { |
| 69 | } | 61 | } |
| 70 | 62 | ||
| 71 | test "type pun value and struct" { | 63 | test "type pun value and struct" { |
| 72 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 73 | |||
| 74 | comptime { | 64 | comptime { |
| 75 | const StructOfU32 = extern struct { x: u32 }; | 65 | const StructOfU32 = extern struct { x: u32 }; |
| 76 | var inst: StructOfU32 = .{ .x = 0 }; | 66 | var inst: StructOfU32 = .{ .x = 0 }; |
| ... | @@ -85,7 +75,6 @@ fn bigToNativeEndian(comptime T: type, v: T) T { | ... | @@ -85,7 +75,6 @@ fn bigToNativeEndian(comptime T: type, v: T) T { |
| 85 | return if (endian == .Big) v else @byteSwap(v); | 75 | return if (endian == .Big) v else @byteSwap(v); |
| 86 | } | 76 | } |
| 87 | test "type pun endianness" { | 77 | test "type pun endianness" { |
| 88 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 89 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 78 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 90 | 79 | ||
| 91 | comptime { | 80 | comptime { |
| ... | @@ -179,8 +168,7 @@ fn doTypePunBitsTest(as_bits: *Bits) !void { | ... | @@ -179,8 +168,7 @@ fn doTypePunBitsTest(as_bits: *Bits) !void { |
| 179 | } | 168 | } |
| 180 | 169 | ||
| 181 | test "type pun bits" { | 170 | test "type pun bits" { |
| 182 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 171 | if (true) { |
| 183 | if (builtin.zig_backend != .stage1) { | ||
| 184 | // TODO https://github.com/ziglang/zig/issues/9646 | 172 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 185 | return error.SkipZigTest; | 173 | return error.SkipZigTest; |
| 186 | } | 174 | } |
| ... | @@ -197,8 +185,7 @@ const imports = struct { | ... | @@ -197,8 +185,7 @@ const imports = struct { |
| 197 | 185 | ||
| 198 | // Make sure lazy values work on their own, before getting into more complex tests | 186 | // Make sure lazy values work on their own, before getting into more complex tests |
| 199 | test "basic pointer preservation" { | 187 | test "basic pointer preservation" { |
| 200 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 188 | if (true) { |
| 201 | if (builtin.zig_backend != .stage1) { | ||
| 202 | // TODO https://github.com/ziglang/zig/issues/9646 | 189 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 203 | return error.SkipZigTest; | 190 | return error.SkipZigTest; |
| 204 | } | 191 | } |
| ... | @@ -211,8 +198,7 @@ test "basic pointer preservation" { | ... | @@ -211,8 +198,7 @@ test "basic pointer preservation" { |
| 211 | } | 198 | } |
| 212 | 199 | ||
| 213 | test "byte copy preserves linker value" { | 200 | test "byte copy preserves linker value" { |
| 214 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 201 | if (true) { |
| 215 | if (builtin.zig_backend != .stage1) { | ||
| 216 | // TODO https://github.com/ziglang/zig/issues/9646 | 202 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 217 | return error.SkipZigTest; | 203 | return error.SkipZigTest; |
| 218 | } | 204 | } |
| ... | @@ -235,8 +221,7 @@ test "byte copy preserves linker value" { | ... | @@ -235,8 +221,7 @@ test "byte copy preserves linker value" { |
| 235 | } | 221 | } |
| 236 | 222 | ||
| 237 | test "unordered byte copy preserves linker value" { | 223 | test "unordered byte copy preserves linker value" { |
| 238 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 224 | if (true) { |
| 239 | if (builtin.zig_backend != .stage1) { | ||
| 240 | // TODO https://github.com/ziglang/zig/issues/9646 | 225 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 241 | return error.SkipZigTest; | 226 | return error.SkipZigTest; |
| 242 | } | 227 | } |
| ... | @@ -260,8 +245,7 @@ test "unordered byte copy preserves linker value" { | ... | @@ -260,8 +245,7 @@ test "unordered byte copy preserves linker value" { |
| 260 | } | 245 | } |
| 261 | 246 | ||
| 262 | test "shuffle chunks of linker value" { | 247 | test "shuffle chunks of linker value" { |
| 263 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 248 | if (true) { |
| 264 | if (builtin.zig_backend != .stage1) { | ||
| 265 | // TODO https://github.com/ziglang/zig/issues/9646 | 249 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 266 | return error.SkipZigTest; | 250 | return error.SkipZigTest; |
| 267 | } | 251 | } |
| ... | @@ -279,8 +263,7 @@ test "shuffle chunks of linker value" { | ... | @@ -279,8 +263,7 @@ test "shuffle chunks of linker value" { |
| 279 | } | 263 | } |
| 280 | 264 | ||
| 281 | test "dance on linker values" { | 265 | test "dance on linker values" { |
| 282 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 266 | if (true) { |
| 283 | if (builtin.zig_backend != .stage1) { | ||
| 284 | // TODO https://github.com/ziglang/zig/issues/9646 | 267 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 285 | return error.SkipZigTest; | 268 | return error.SkipZigTest; |
| 286 | } | 269 | } |
| ... | @@ -311,8 +294,7 @@ test "dance on linker values" { | ... | @@ -311,8 +294,7 @@ test "dance on linker values" { |
| 311 | } | 294 | } |
| 312 | 295 | ||
| 313 | test "offset array ptr by element size" { | 296 | test "offset array ptr by element size" { |
| 314 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 297 | if (true) { |
| 315 | if (builtin.zig_backend != .stage1) { | ||
| 316 | // TODO https://github.com/ziglang/zig/issues/9646 | 298 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 317 | return error.SkipZigTest; | 299 | return error.SkipZigTest; |
| 318 | } | 300 | } |
| ... | @@ -339,8 +321,7 @@ test "offset array ptr by element size" { | ... | @@ -339,8 +321,7 @@ test "offset array ptr by element size" { |
| 339 | } | 321 | } |
| 340 | 322 | ||
| 341 | test "offset instance by field size" { | 323 | test "offset instance by field size" { |
| 342 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 324 | if (true) { |
| 343 | if (builtin.zig_backend != .stage1) { | ||
| 344 | // TODO https://github.com/ziglang/zig/issues/9646 | 325 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 345 | return error.SkipZigTest; | 326 | return error.SkipZigTest; |
| 346 | } | 327 | } |
| ... | @@ -365,8 +346,7 @@ test "offset instance by field size" { | ... | @@ -365,8 +346,7 @@ test "offset instance by field size" { |
| 365 | } | 346 | } |
| 366 | 347 | ||
| 367 | test "offset field ptr by enclosing array element size" { | 348 | test "offset field ptr by enclosing array element size" { |
| 368 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 349 | if (true) { |
| 369 | if (builtin.zig_backend != .stage1) { | ||
| 370 | // TODO https://github.com/ziglang/zig/issues/9646 | 350 | // TODO https://github.com/ziglang/zig/issues/9646 |
| 371 | return error.SkipZigTest; | 351 | return error.SkipZigTest; |
| 372 | } | 352 | } |
| ... | @@ -395,7 +375,6 @@ test "offset field ptr by enclosing array element size" { | ... | @@ -395,7 +375,6 @@ test "offset field ptr by enclosing array element size" { |
| 395 | } | 375 | } |
| 396 | 376 | ||
| 397 | test "accessing reinterpreted memory of parent object" { | 377 | test "accessing reinterpreted memory of parent object" { |
| 398 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 399 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 378 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 400 | const S = extern struct { | 379 | const S = extern struct { |
| 401 | a: f32, | 380 | a: f32, |
test/behavior/error.zig-15| ... | @@ -151,7 +151,6 @@ test "fn returning empty error set can be passed as fn returning any error" { | ... | @@ -151,7 +151,6 @@ test "fn returning empty error set can be passed as fn returning any error" { |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | test "fn returning empty error set can be passed as fn returning any error - pointer" { | 153 | test "fn returning empty error set can be passed as fn returning any error - pointer" { |
| 154 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 155 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 154 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 156 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 155 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 157 | 156 | ||
| ... | @@ -465,11 +464,6 @@ test "nested catch" { | ... | @@ -465,11 +464,6 @@ test "nested catch" { |
| 465 | } | 464 | } |
| 466 | 465 | ||
| 467 | test "function pointer with return type that is error union with payload which is pointer of parent struct" { | 466 | test "function pointer with return type that is error union with payload which is pointer of parent struct" { |
| 468 | if (builtin.zig_backend == .stage1) { | ||
| 469 | // stage1 has wrong function pointer semantics | ||
| 470 | return error.SkipZigTest; | ||
| 471 | } | ||
| 472 | |||
| 473 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 467 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 474 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 468 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 475 | 469 | ||
| ... | @@ -582,9 +576,6 @@ pub fn testBuiltinErrorName(err: anyerror) [:0]const u8 { | ... | @@ -582,9 +576,6 @@ pub fn testBuiltinErrorName(err: anyerror) [:0]const u8 { |
| 582 | } | 576 | } |
| 583 | 577 | ||
| 584 | test "error set equality" { | 578 | test "error set equality" { |
| 585 | // This tests using stage2 logic (#11022) | ||
| 586 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 587 | |||
| 588 | const a = error{One}; | 579 | const a = error{One}; |
| 589 | const b = error{One}; | 580 | const b = error{One}; |
| 590 | 581 | ||
| ... | @@ -752,7 +743,6 @@ const NoReturn = struct { | ... | @@ -752,7 +743,6 @@ const NoReturn = struct { |
| 752 | }; | 743 | }; |
| 753 | 744 | ||
| 754 | test "error union of noreturn used with if" { | 745 | test "error union of noreturn used with if" { |
| 755 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 756 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 746 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 757 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 747 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 758 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 748 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | @@ -767,7 +757,6 @@ test "error union of noreturn used with if" { | ... | @@ -767,7 +757,6 @@ test "error union of noreturn used with if" { |
| 767 | } | 757 | } |
| 768 | 758 | ||
| 769 | test "error union of noreturn used with try" { | 759 | test "error union of noreturn used with try" { |
| 770 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 771 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 760 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 772 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 761 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 773 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 762 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | @@ -779,7 +768,6 @@ test "error union of noreturn used with try" { | ... | @@ -779,7 +768,6 @@ test "error union of noreturn used with try" { |
| 779 | } | 768 | } |
| 780 | 769 | ||
| 781 | test "error union of noreturn used with catch" { | 770 | test "error union of noreturn used with catch" { |
| 782 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 783 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 771 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 784 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 772 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 785 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 773 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| ... | @@ -807,7 +795,6 @@ test "alignment of wrapping an error union payload" { | ... | @@ -807,7 +795,6 @@ test "alignment of wrapping an error union payload" { |
| 807 | } | 795 | } |
| 808 | 796 | ||
| 809 | test "compare error union and error set" { | 797 | test "compare error union and error set" { |
| 810 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 811 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 798 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 812 | 799 | ||
| 813 | var a: anyerror = error.Foo; | 800 | var a: anyerror = error.Foo; |
| ... | @@ -857,8 +844,6 @@ test "error from comptime string" { | ... | @@ -857,8 +844,6 @@ test "error from comptime string" { |
| 857 | } | 844 | } |
| 858 | 845 | ||
| 859 | test "field access of anyerror results in smaller error set" { | 846 | test "field access of anyerror results in smaller error set" { |
| 860 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 861 | |||
| 862 | const E1 = @TypeOf(error.Foo); | 847 | const E1 = @TypeOf(error.Foo); |
| 863 | try expect(@TypeOf(E1.Foo) == E1); | 848 | try expect(@TypeOf(E1.Foo) == E1); |
| 864 | const E2 = error{ A, B, C }; | 849 | const E2 = error{ A, B, C }; |
test/behavior/eval.zig+9-21| ... | @@ -606,15 +606,16 @@ fn assertEqualPtrs(ptr1: *const u8, ptr2: *const u8) !void { | ... | @@ -606,15 +606,16 @@ fn assertEqualPtrs(ptr1: *const u8, ptr2: *const u8) !void { |
| 606 | 606 | ||
| 607 | // This one is still up for debate in the language specification. | 607 | // This one is still up for debate in the language specification. |
| 608 | // Application code should not rely on this behavior until it is solidified. | 608 | // Application code should not rely on this behavior until it is solidified. |
| 609 | // Currently, stage1 has special case code to make this pass for string literals | 609 | // Historically, stage1 had special case code to make this pass for string literals |
| 610 | // but it does not work if the values are constructed with comptime code, or if | 610 | // but it did not work if the values are constructed with comptime code, or if |
| 611 | // arrays of non-u8 elements are used instead. | 611 | // arrays of non-u8 elements are used instead. |
| 612 | // The official language specification might not make this guarantee. However, if | 612 | // The official language specification might not make this guarantee. However, if |
| 613 | // it does make this guarantee, it will make it consistently for all types, not | 613 | // it does make this guarantee, it will make it consistently for all types, not |
| 614 | // only string literals. This is why stage2 currently has a string table for | 614 | // only string literals. This is why Zig currently has a string table for |
| 615 | // string literals, to match stage1 and pass this test, however the end-game once | 615 | // string literals, to match legacy stage1 behavior and pass this test, however |
| 616 | // the lang spec issue is settled would be to use a global InternPool for comptime | 616 | // the end-game once the lang spec issue is settled would be to use a global |
| 617 | // memoized objects, making this behavior consistent across all types. | 617 | // InternPool for comptime memoized objects, making this behavior consistent |
| 618 | // across all types. | ||
| 618 | test "string literal used as comptime slice is memoized" { | 619 | test "string literal used as comptime slice is memoized" { |
| 619 | const a = "link"; | 620 | const a = "link"; |
| 620 | const b = "link"; | 621 | const b = "link"; |
| ... | @@ -742,7 +743,6 @@ fn scalar(x: u32) u32 { | ... | @@ -742,7 +743,6 @@ fn scalar(x: u32) u32 { |
| 742 | } | 743 | } |
| 743 | 744 | ||
| 744 | test "array concatenation peer resolves element types - value" { | 745 | test "array concatenation peer resolves element types - value" { |
| 745 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 746 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 746 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 747 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 747 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 748 | 748 | ||
| ... | @@ -758,7 +758,6 @@ test "array concatenation peer resolves element types - value" { | ... | @@ -758,7 +758,6 @@ test "array concatenation peer resolves element types - value" { |
| 758 | } | 758 | } |
| 759 | 759 | ||
| 760 | test "array concatenation peer resolves element types - pointer" { | 760 | test "array concatenation peer resolves element types - pointer" { |
| 761 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 762 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 761 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 763 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 762 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 764 | 763 | ||
| ... | @@ -774,7 +773,6 @@ test "array concatenation peer resolves element types - pointer" { | ... | @@ -774,7 +773,6 @@ test "array concatenation peer resolves element types - pointer" { |
| 774 | } | 773 | } |
| 775 | 774 | ||
| 776 | test "array concatenation sets the sentinel - value" { | 775 | test "array concatenation sets the sentinel - value" { |
| 777 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 778 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 776 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 779 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 777 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 780 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 778 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -794,7 +792,6 @@ test "array concatenation sets the sentinel - value" { | ... | @@ -794,7 +792,6 @@ test "array concatenation sets the sentinel - value" { |
| 794 | } | 792 | } |
| 795 | 793 | ||
| 796 | test "array concatenation sets the sentinel - pointer" { | 794 | test "array concatenation sets the sentinel - pointer" { |
| 797 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 798 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 795 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 799 | 796 | ||
| 800 | var a = [2]u3{ 1, 7 }; | 797 | var a = [2]u3{ 1, 7 }; |
| ... | @@ -811,7 +808,6 @@ test "array concatenation sets the sentinel - pointer" { | ... | @@ -811,7 +808,6 @@ test "array concatenation sets the sentinel - pointer" { |
| 811 | } | 808 | } |
| 812 | 809 | ||
| 813 | test "array multiplication sets the sentinel - value" { | 810 | test "array multiplication sets the sentinel - value" { |
| 814 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 815 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 811 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 816 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 812 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 817 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 813 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -829,7 +825,6 @@ test "array multiplication sets the sentinel - value" { | ... | @@ -829,7 +825,6 @@ test "array multiplication sets the sentinel - value" { |
| 829 | } | 825 | } |
| 830 | 826 | ||
| 831 | test "array multiplication sets the sentinel - pointer" { | 827 | test "array multiplication sets the sentinel - pointer" { |
| 832 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 833 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 828 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 834 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 829 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 835 | 830 | ||
| ... | @@ -894,8 +889,6 @@ test "const type-annotated local initialized with function call has correct type | ... | @@ -894,8 +889,6 @@ test "const type-annotated local initialized with function call has correct type |
| 894 | } | 889 | } |
| 895 | 890 | ||
| 896 | test "comptime pointer load through elem_ptr" { | 891 | test "comptime pointer load through elem_ptr" { |
| 897 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // stage1 fails this test | ||
| 898 | |||
| 899 | const S = struct { | 892 | const S = struct { |
| 900 | x: usize, | 893 | x: usize, |
| 901 | }; | 894 | }; |
| ... | @@ -1038,7 +1031,6 @@ test "comptime break operand passing through runtime condition converted to runt | ... | @@ -1038,7 +1031,6 @@ test "comptime break operand passing through runtime condition converted to runt |
| 1038 | } | 1031 | } |
| 1039 | 1032 | ||
| 1040 | test "comptime break operand passing through runtime switch converted to runtime break" { | 1033 | test "comptime break operand passing through runtime switch converted to runtime break" { |
| 1041 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1042 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1034 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1043 | 1035 | ||
| 1044 | const S = struct { | 1036 | const S = struct { |
| ... | @@ -1294,8 +1286,6 @@ test "repeated value is correctly expanded" { | ... | @@ -1294,8 +1286,6 @@ test "repeated value is correctly expanded" { |
| 1294 | } | 1286 | } |
| 1295 | 1287 | ||
| 1296 | test "value in if block is comptime-known" { | 1288 | test "value in if block is comptime-known" { |
| 1297 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1298 | |||
| 1299 | const first = blk: { | 1289 | const first = blk: { |
| 1300 | const s = if (false) "a" else "b"; | 1290 | const s = if (false) "a" else "b"; |
| 1301 | break :blk "foo" ++ s; | 1291 | break :blk "foo" ++ s; |
| ... | @@ -1330,8 +1320,6 @@ test "lazy value is resolved as slice operand" { | ... | @@ -1330,8 +1320,6 @@ test "lazy value is resolved as slice operand" { |
| 1330 | } | 1320 | } |
| 1331 | 1321 | ||
| 1332 | test "break from inline loop depends on runtime condition" { | 1322 | test "break from inline loop depends on runtime condition" { |
| 1333 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1334 | |||
| 1335 | const S = struct { | 1323 | const S = struct { |
| 1336 | fn foo(a: u8) bool { | 1324 | fn foo(a: u8) bool { |
| 1337 | return a == 4; | 1325 | return a == 4; |
| ... | @@ -1405,7 +1393,7 @@ test "length of global array is determinable at comptime" { | ... | @@ -1405,7 +1393,7 @@ test "length of global array is determinable at comptime" { |
| 1405 | 1393 | ||
| 1406 | test "continue nested inline for loop" { | 1394 | test "continue nested inline for loop" { |
| 1407 | // TODO: https://github.com/ziglang/zig/issues/13175 | 1395 | // TODO: https://github.com/ziglang/zig/issues/13175 |
| 1408 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | 1396 | if (true) return error.SkipZigTest; |
| 1409 | 1397 | ||
| 1410 | var a: u8 = 0; | 1398 | var a: u8 = 0; |
| 1411 | loop: inline for ([_]u8{ 1, 2 }) |x| { | 1399 | loop: inline for ([_]u8{ 1, 2 }) |x| { |
| ... | @@ -1422,7 +1410,7 @@ test "continue nested inline for loop" { | ... | @@ -1422,7 +1410,7 @@ test "continue nested inline for loop" { |
| 1422 | 1410 | ||
| 1423 | test "continue nested inline for loop in named block expr" { | 1411 | test "continue nested inline for loop in named block expr" { |
| 1424 | // TODO: https://github.com/ziglang/zig/issues/13175 | 1412 | // TODO: https://github.com/ziglang/zig/issues/13175 |
| 1425 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | 1413 | if (true) return error.SkipZigTest; |
| 1426 | 1414 | ||
| 1427 | var a: u8 = 0; | 1415 | var a: u8 = 0; |
| 1428 | loop: inline for ([_]u8{ 1, 2 }) |x| { | 1416 | loop: inline for ([_]u8{ 1, 2 }) |x| { |
test/behavior/floatop.zig+1-15| ... | @@ -114,7 +114,7 @@ fn testSqrt() !void { | ... | @@ -114,7 +114,7 @@ fn testSqrt() !void { |
| 114 | try expect(math.approxEqAbs(f32, @sqrt(@as(f32, 1.1)), 1.0488088481701516, epsilon)); | 114 | try expect(math.approxEqAbs(f32, @sqrt(@as(f32, 1.1)), 1.0488088481701516, epsilon)); |
| 115 | try expect(math.approxEqAbs(f32, @sqrt(@as(f32, 2.0)), 1.4142135623730950, epsilon)); | 115 | try expect(math.approxEqAbs(f32, @sqrt(@as(f32, 2.0)), 1.4142135623730950, epsilon)); |
| 116 | 116 | ||
| 117 | if (builtin.zig_backend == .stage1) { | 117 | if (false) { |
| 118 | if (has_f80_rt) { | 118 | if (has_f80_rt) { |
| 119 | // TODO https://github.com/ziglang/zig/issues/10875 | 119 | // TODO https://github.com/ziglang/zig/issues/10875 |
| 120 | if (builtin.os.tag != .freebsd) { | 120 | if (builtin.os.tag != .freebsd) { |
| ... | @@ -181,10 +181,6 @@ test "more @sqrt f16 tests" { | ... | @@ -181,10 +181,6 @@ test "more @sqrt f16 tests" { |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | test "@sin" { | 183 | test "@sin" { |
| 184 | if (builtin.zig_backend == .stage1) { | ||
| 185 | // stage1 emits an incorrect compile error for `@as(ty, std.math.pi / 2)` | ||
| 186 | return error.SkipZigTest; | ||
| 187 | } | ||
| 188 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 184 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 189 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 185 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 190 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 186 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -205,7 +201,6 @@ fn testSin() !void { | ... | @@ -205,7 +201,6 @@ fn testSin() !void { |
| 205 | } | 201 | } |
| 206 | 202 | ||
| 207 | test "@sin with vectors" { | 203 | test "@sin with vectors" { |
| 208 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 209 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 204 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 210 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 205 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 211 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 206 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -226,10 +221,6 @@ fn testSinWithVectors() !void { | ... | @@ -226,10 +221,6 @@ fn testSinWithVectors() !void { |
| 226 | } | 221 | } |
| 227 | 222 | ||
| 228 | test "@cos" { | 223 | test "@cos" { |
| 229 | if (builtin.zig_backend == .stage1) { | ||
| 230 | // stage1 emits an incorrect compile error for `@as(ty, std.math.pi / 2)` | ||
| 231 | return error.SkipZigTest; | ||
| 232 | } | ||
| 233 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 224 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 234 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 225 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 235 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 226 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -250,7 +241,6 @@ fn testCos() !void { | ... | @@ -250,7 +241,6 @@ fn testCos() !void { |
| 250 | } | 241 | } |
| 251 | 242 | ||
| 252 | test "@cos with vectors" { | 243 | test "@cos with vectors" { |
| 253 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 254 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 244 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 255 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 245 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 256 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 246 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -781,7 +771,6 @@ test "f128 at compile time is lossy" { | ... | @@ -781,7 +771,6 @@ test "f128 at compile time is lossy" { |
| 781 | } | 771 | } |
| 782 | 772 | ||
| 783 | test "comptime fixed-width float zero divided by zero produces NaN" { | 773 | test "comptime fixed-width float zero divided by zero produces NaN" { |
| 784 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 785 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 774 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 786 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 775 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 787 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 776 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -793,7 +782,6 @@ test "comptime fixed-width float zero divided by zero produces NaN" { | ... | @@ -793,7 +782,6 @@ test "comptime fixed-width float zero divided by zero produces NaN" { |
| 793 | } | 782 | } |
| 794 | 783 | ||
| 795 | test "comptime fixed-width float non-zero divided by zero produces signed Inf" { | 784 | test "comptime fixed-width float non-zero divided by zero produces signed Inf" { |
| 796 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 797 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 785 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 798 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 786 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 799 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 787 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -810,8 +798,6 @@ test "comptime fixed-width float non-zero divided by zero produces signed Inf" { | ... | @@ -810,8 +798,6 @@ test "comptime fixed-width float non-zero divided by zero produces signed Inf" { |
| 810 | } | 798 | } |
| 811 | 799 | ||
| 812 | test "comptime_float zero divided by zero produces zero" { | 800 | test "comptime_float zero divided by zero produces zero" { |
| 813 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 814 | |||
| 815 | try expect((0.0 / 0.0) == 0.0); | 801 | try expect((0.0 / 0.0) == 0.0); |
| 816 | } | 802 | } |
| 817 | 803 |
test/behavior/fn.zig-10| ... | @@ -68,8 +68,6 @@ fn outer(y: u32) *const fn (u32) u32 { | ... | @@ -68,8 +68,6 @@ fn outer(y: u32) *const fn (u32) u32 { |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | test "return inner function which references comptime variable of outer function" { | 70 | test "return inner function which references comptime variable of outer function" { |
| 71 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 72 | |||
| 73 | var func = outer(10); | 71 | var func = outer(10); |
| 74 | try expect(func(3) == 7); | 72 | try expect(func(3) == 7); |
| 75 | } | 73 | } |
| ... | @@ -97,7 +95,6 @@ test "discard the result of a function that returns a struct" { | ... | @@ -97,7 +95,6 @@ test "discard the result of a function that returns a struct" { |
| 97 | } | 95 | } |
| 98 | 96 | ||
| 99 | test "inline function call that calls optional function pointer, return pointer at callsite interacts correctly with callsite return type" { | 97 | test "inline function call that calls optional function pointer, return pointer at callsite interacts correctly with callsite return type" { |
| 100 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 101 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 98 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 102 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 99 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 103 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 100 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| ... | @@ -145,7 +142,6 @@ fn fnWithUnreachable() noreturn { | ... | @@ -145,7 +142,6 @@ fn fnWithUnreachable() noreturn { |
| 145 | } | 142 | } |
| 146 | 143 | ||
| 147 | test "extern struct with stdcallcc fn pointer" { | 144 | test "extern struct with stdcallcc fn pointer" { |
| 148 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 149 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 145 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 150 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 146 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 151 | 147 | ||
| ... | @@ -293,11 +289,6 @@ fn acceptsString(foo: []u8) void { | ... | @@ -293,11 +289,6 @@ fn acceptsString(foo: []u8) void { |
| 293 | } | 289 | } |
| 294 | 290 | ||
| 295 | test "function pointers" { | 291 | test "function pointers" { |
| 296 | if (builtin.zig_backend == .stage1) { | ||
| 297 | // stage1 has wrong semantics for function pointers | ||
| 298 | return error.SkipZigTest; | ||
| 299 | } | ||
| 300 | |||
| 301 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 292 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 302 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 293 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 303 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 294 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -415,7 +406,6 @@ test "import passed byref to function in return type" { | ... | @@ -415,7 +406,6 @@ test "import passed byref to function in return type" { |
| 415 | } | 406 | } |
| 416 | 407 | ||
| 417 | test "implicit cast function to function ptr" { | 408 | test "implicit cast function to function ptr" { |
| 418 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 419 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 409 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 420 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 410 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 421 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 411 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
test/behavior/generics.zig+2-4| ... | @@ -21,8 +21,8 @@ test "simple generic fn" { | ... | @@ -21,8 +21,8 @@ test "simple generic fn" { |
| 21 | 21 | ||
| 22 | try expect(max(i32, 3, -1) == 3); | 22 | try expect(max(i32, 3, -1) == 3); |
| 23 | try expect(max(u8, 1, 100) == 100); | 23 | try expect(max(u8, 1, 100) == 100); |
| 24 | if (builtin.zig_backend == .stage1) { | 24 | if (false) { |
| 25 | // TODO: stage2 is incorrectly emitting the following: | 25 | // TODO: zig is incorrectly emitting the following: |
| 26 | // error: cast of value 1.23e-01 to type 'f32' loses information | 26 | // error: cast of value 1.23e-01 to type 'f32' loses information |
| 27 | try expect(max(f32, 0.123, 0.456) == 0.456); | 27 | try expect(max(f32, 0.123, 0.456) == 0.456); |
| 28 | } | 28 | } |
| ... | @@ -342,8 +342,6 @@ test "generic instantiation of tagged union with only one field" { | ... | @@ -342,8 +342,6 @@ test "generic instantiation of tagged union with only one field" { |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | test "nested generic function" { | 344 | test "nested generic function" { |
| 345 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 346 | |||
| 347 | const S = struct { | 345 | const S = struct { |
| 348 | fn foo(comptime T: type, callback: *const fn (user_data: T) anyerror!void, data: T) anyerror!void { | 346 | fn foo(comptime T: type, callback: *const fn (user_data: T) anyerror!void, data: T) anyerror!void { |
| 349 | try callback(data); | 347 | try callback(data); |
test/behavior/int128.zig+2-2| ... | @@ -29,8 +29,8 @@ test "undefined 128 bit int" { | ... | @@ -29,8 +29,8 @@ test "undefined 128 bit int" { |
| 29 | 29 | ||
| 30 | @setRuntimeSafety(true); | 30 | @setRuntimeSafety(true); |
| 31 | 31 | ||
| 32 | // TODO implement @setRuntimeSafety in stage2 | 32 | // TODO implement @setRuntimeSafety |
| 33 | if (builtin.zig_backend != .stage1 and builtin.mode != .Debug and builtin.mode != .ReleaseSafe) { | 33 | if (builtin.mode != .Debug and builtin.mode != .ReleaseSafe) { |
| 34 | return error.SkipZigTest; | 34 | return error.SkipZigTest; |
| 35 | } | 35 | } |
| 36 | 36 |
test/behavior/inttoptr.zig-2| ... | @@ -1,8 +1,6 @@ | ... | @@ -1,8 +1,6 @@ |
| 1 | const builtin = @import("builtin"); | 1 | const builtin = @import("builtin"); |
| 2 | 2 | ||
| 3 | test "casting integer address to function pointer" { | 3 | test "casting integer address to function pointer" { |
| 4 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 5 | |||
| 6 | addressToFunction(); | 4 | addressToFunction(); |
| 7 | comptime addressToFunction(); | 5 | comptime addressToFunction(); |
| 8 | } | 6 | } |
test/behavior/math.zig+4-13| ... | @@ -94,7 +94,6 @@ fn testOneClz(comptime T: type, x: T) u32 { | ... | @@ -94,7 +94,6 @@ fn testOneClz(comptime T: type, x: T) u32 { |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | test "@clz vectors" { | 96 | test "@clz vectors" { |
| 97 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 98 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 97 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 98 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 100 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 99 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -156,7 +155,6 @@ fn testOneCtz(comptime T: type, x: T) u32 { | ... | @@ -156,7 +155,6 @@ fn testOneCtz(comptime T: type, x: T) u32 { |
| 156 | } | 155 | } |
| 157 | 156 | ||
| 158 | test "@ctz vectors" { | 157 | test "@ctz vectors" { |
| 159 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 160 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 158 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 161 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 159 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 162 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 160 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -971,8 +969,6 @@ test "overflow arithmetic with u0 values" { | ... | @@ -971,8 +969,6 @@ test "overflow arithmetic with u0 values" { |
| 971 | } | 969 | } |
| 972 | 970 | ||
| 973 | test "allow signed integer division/remainder when values are comptime-known and positive or exact" { | 971 | test "allow signed integer division/remainder when values are comptime-known and positive or exact" { |
| 974 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 975 | |||
| 976 | try expect(5 / 3 == 1); | 972 | try expect(5 / 3 == 1); |
| 977 | try expect(-5 / -3 == 1); | 973 | try expect(-5 / -3 == 1); |
| 978 | try expect(-6 / 3 == -2); | 974 | try expect(-6 / 3 == -2); |
| ... | @@ -1009,14 +1005,8 @@ test "quad hex float literal parsing accurate" { | ... | @@ -1009,14 +1005,8 @@ test "quad hex float literal parsing accurate" { |
| 1009 | try expect(@bitCast(u128, f) == 0x40042eab345678439abcdefea5678234); | 1005 | try expect(@bitCast(u128, f) == 0x40042eab345678439abcdefea5678234); |
| 1010 | } | 1006 | } |
| 1011 | { | 1007 | { |
| 1012 | // TODO: modify stage1/parse_f128.c to use round-to-even | 1008 | var f: f128 = 0x1.edcb34a235253948765432134674fp-1; |
| 1013 | if (builtin.zig_backend == .stage1) { | 1009 | try expect(@bitCast(u128, f) == 0x3ffeedcb34a235253948765432134675); // round-to-even |
| 1014 | var f: f128 = 0x1.edcb34a235253948765432134674fp-1; | ||
| 1015 | try expect(@bitCast(u128, f) == 0x3ffeedcb34a235253948765432134674); // round-down | ||
| 1016 | } else { | ||
| 1017 | var f: f128 = 0x1.edcb34a235253948765432134674fp-1; | ||
| 1018 | try expect(@bitCast(u128, f) == 0x3ffeedcb34a235253948765432134675); // round-to-even | ||
| 1019 | } | ||
| 1020 | } | 1010 | } |
| 1021 | { | 1011 | { |
| 1022 | var f: f128 = 0x1.353e45674d89abacc3a2ebf3ff4ffp-50; | 1012 | var f: f128 = 0x1.353e45674d89abacc3a2ebf3ff4ffp-50; |
| ... | @@ -1270,7 +1260,8 @@ test "@sqrt" { | ... | @@ -1270,7 +1260,8 @@ test "@sqrt" { |
| 1270 | try testSqrt(f16, 13.0); | 1260 | try testSqrt(f16, 13.0); |
| 1271 | comptime try testSqrt(f16, 13.0); | 1261 | comptime try testSqrt(f16, 13.0); |
| 1272 | 1262 | ||
| 1273 | if (builtin.zig_backend == .stage1) { | 1263 | // TODO: make this pass |
| 1264 | if (false) { | ||
| 1274 | const x = 14.0; | 1265 | const x = 14.0; |
| 1275 | const y = x * x; | 1266 | const y = x * x; |
| 1276 | const z = @sqrt(y); | 1267 | const z = @sqrt(y); |
test/behavior/member_func.zig-2| ... | @@ -27,7 +27,6 @@ const HasFuncs = struct { | ... | @@ -27,7 +27,6 @@ const HasFuncs = struct { |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | test "standard field calls" { | 29 | test "standard field calls" { |
| 30 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 31 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 30 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 32 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 31 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 33 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 32 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| ... | @@ -71,7 +70,6 @@ test "standard field calls" { | ... | @@ -71,7 +70,6 @@ test "standard field calls" { |
| 71 | } | 70 | } |
| 72 | 71 | ||
| 73 | test "@field field calls" { | 72 | test "@field field calls" { |
| 74 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 75 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 73 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 76 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 74 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 77 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 75 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
test/behavior/muladd.zig-6| ... | @@ -47,7 +47,6 @@ test "@mulAdd f80" { | ... | @@ -47,7 +47,6 @@ test "@mulAdd f80" { |
| 47 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 47 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 48 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 48 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 50 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 51 | if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .windows) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/12602 | 50 | if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .windows) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/12602 |
| 52 | 51 | ||
| 53 | comptime try testMulAdd80(); | 52 | comptime try testMulAdd80(); |
| ... | @@ -91,7 +90,6 @@ fn vector16() !void { | ... | @@ -91,7 +90,6 @@ fn vector16() !void { |
| 91 | } | 90 | } |
| 92 | 91 | ||
| 93 | test "vector f16" { | 92 | test "vector f16" { |
| 94 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 95 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 93 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 96 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 94 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 97 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 95 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -115,7 +113,6 @@ fn vector32() !void { | ... | @@ -115,7 +113,6 @@ fn vector32() !void { |
| 115 | } | 113 | } |
| 116 | 114 | ||
| 117 | test "vector f32" { | 115 | test "vector f32" { |
| 118 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 119 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 116 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 120 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 117 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 121 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 118 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -139,7 +136,6 @@ fn vector64() !void { | ... | @@ -139,7 +136,6 @@ fn vector64() !void { |
| 139 | } | 136 | } |
| 140 | 137 | ||
| 141 | test "vector f64" { | 138 | test "vector f64" { |
| 142 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 143 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 139 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 144 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 140 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 145 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 141 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -162,7 +158,6 @@ fn vector80() !void { | ... | @@ -162,7 +158,6 @@ fn vector80() !void { |
| 162 | } | 158 | } |
| 163 | 159 | ||
| 164 | test "vector f80" { | 160 | test "vector f80" { |
| 165 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 166 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 161 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 167 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 162 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 168 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 163 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -187,7 +182,6 @@ fn vector128() !void { | ... | @@ -187,7 +182,6 @@ fn vector128() !void { |
| 187 | } | 182 | } |
| 188 | 183 | ||
| 189 | test "vector f128" { | 184 | test "vector f128" { |
| 190 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 191 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 185 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 192 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 186 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 193 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/optional.zig-5| ... | @@ -377,8 +377,6 @@ const NoReturn = struct { | ... | @@ -377,8 +377,6 @@ const NoReturn = struct { |
| 377 | }; | 377 | }; |
| 378 | 378 | ||
| 379 | test "optional of noreturn used with if" { | 379 | test "optional of noreturn used with if" { |
| 380 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 381 | |||
| 382 | NoReturn.a = 64; | 380 | NoReturn.a = 64; |
| 383 | if (NoReturn.loop()) |_| { | 381 | if (NoReturn.loop()) |_| { |
| 384 | @compileError("bad"); | 382 | @compileError("bad"); |
| ... | @@ -388,8 +386,6 @@ test "optional of noreturn used with if" { | ... | @@ -388,8 +386,6 @@ test "optional of noreturn used with if" { |
| 388 | } | 386 | } |
| 389 | 387 | ||
| 390 | test "optional of noreturn used with orelse" { | 388 | test "optional of noreturn used with orelse" { |
| 391 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 392 | |||
| 393 | NoReturn.a = 64; | 389 | NoReturn.a = 64; |
| 394 | const val = NoReturn.testOrelse(); | 390 | const val = NoReturn.testOrelse(); |
| 395 | try expect(val == 123); | 391 | try expect(val == 123); |
| ... | @@ -419,7 +415,6 @@ test "alignment of wrapping an optional payload" { | ... | @@ -419,7 +415,6 @@ test "alignment of wrapping an optional payload" { |
| 419 | } | 415 | } |
| 420 | 416 | ||
| 421 | test "Optional slice size is optimized" { | 417 | test "Optional slice size is optimized" { |
| 422 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 423 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 418 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 424 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 419 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 425 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 420 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
test/behavior/packed-struct.zig-38| ... | @@ -5,38 +5,7 @@ const expect = std.testing.expect; | ... | @@ -5,38 +5,7 @@ const expect = std.testing.expect; |
| 5 | const expectEqual = std.testing.expectEqual; | 5 | const expectEqual = std.testing.expectEqual; |
| 6 | const native_endian = builtin.cpu.arch.endian(); | 6 | const native_endian = builtin.cpu.arch.endian(); |
| 7 | 7 | ||
| 8 | test "correct size of packed structs" { | ||
| 9 | // Stage2 has different packed struct semantics. | ||
| 10 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | ||
| 11 | const T1 = packed struct { one: u8, three: [3]u8 }; | ||
| 12 | |||
| 13 | try expectEqual(4, @sizeOf(T1)); | ||
| 14 | try expectEqual(4 * 8, @bitSizeOf(T1)); | ||
| 15 | |||
| 16 | const T2 = packed struct { three: [3]u8, one: u8 }; | ||
| 17 | |||
| 18 | try expectEqual(4, @sizeOf(T2)); | ||
| 19 | try expectEqual(4 * 8, @bitSizeOf(T2)); | ||
| 20 | |||
| 21 | const T3 = packed struct { _1: u1, x: u7, _: u24 }; | ||
| 22 | |||
| 23 | try expectEqual(4, @sizeOf(T3)); | ||
| 24 | try expectEqual(4 * 8, @bitSizeOf(T3)); | ||
| 25 | |||
| 26 | const T4 = packed struct { _1: u1, x: u7, _2: u8, _3: u16 }; | ||
| 27 | |||
| 28 | try expectEqual(4, @sizeOf(T4)); | ||
| 29 | try expectEqual(4 * 8, @bitSizeOf(T4)); | ||
| 30 | |||
| 31 | const T5 = packed struct { _1: u1, x: u7, _2: u16, _3: u8 }; | ||
| 32 | |||
| 33 | try expectEqual(4, @sizeOf(T5)); | ||
| 34 | try expectEqual(4 * 8, @bitSizeOf(T5)); | ||
| 35 | } | ||
| 36 | |||
| 37 | test "flags in packed structs" { | 8 | test "flags in packed structs" { |
| 38 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 39 | |||
| 40 | const Flags1 = packed struct { | 9 | const Flags1 = packed struct { |
| 41 | // first 8 bits | 10 | // first 8 bits |
| 42 | b0_0: u1, | 11 | b0_0: u1, |
| ... | @@ -121,8 +90,6 @@ test "flags in packed structs" { | ... | @@ -121,8 +90,6 @@ test "flags in packed structs" { |
| 121 | } | 90 | } |
| 122 | 91 | ||
| 123 | test "consistent size of packed structs" { | 92 | test "consistent size of packed structs" { |
| 124 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 125 | |||
| 126 | const TxData1 = packed struct { data: u8, _23: u23, full: bool = false }; | 93 | const TxData1 = packed struct { data: u8, _23: u23, full: bool = false }; |
| 127 | const TxData2 = packed struct { data: u9, _22: u22, full: bool = false }; | 94 | const TxData2 = packed struct { data: u9, _22: u22, full: bool = false }; |
| 128 | 95 | ||
| ... | @@ -149,7 +116,6 @@ test "consistent size of packed structs" { | ... | @@ -149,7 +116,6 @@ test "consistent size of packed structs" { |
| 149 | } | 116 | } |
| 150 | 117 | ||
| 151 | test "correct sizeOf and offsets in packed structs" { | 118 | test "correct sizeOf and offsets in packed structs" { |
| 152 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 153 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 119 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 154 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 120 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 155 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 121 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -218,7 +184,6 @@ test "correct sizeOf and offsets in packed structs" { | ... | @@ -218,7 +184,6 @@ test "correct sizeOf and offsets in packed structs" { |
| 218 | } | 184 | } |
| 219 | 185 | ||
| 220 | test "nested packed structs" { | 186 | test "nested packed structs" { |
| 221 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 222 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 223 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 188 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 224 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 189 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -285,7 +250,6 @@ test "regular in irregular packed struct" { | ... | @@ -285,7 +250,6 @@ test "regular in irregular packed struct" { |
| 285 | } | 250 | } |
| 286 | 251 | ||
| 287 | test "byte-aligned field pointer offsets" { | 252 | test "byte-aligned field pointer offsets" { |
| 288 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 289 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 253 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 290 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 254 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 291 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 255 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -387,7 +351,6 @@ test "byte-aligned field pointer offsets" { | ... | @@ -387,7 +351,6 @@ test "byte-aligned field pointer offsets" { |
| 387 | } | 351 | } |
| 388 | 352 | ||
| 389 | test "load pointer from packed struct" { | 353 | test "load pointer from packed struct" { |
| 390 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 391 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 354 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 392 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 355 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 393 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 356 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| ... | @@ -571,7 +534,6 @@ test "runtime init of unnamed packed struct type" { | ... | @@ -571,7 +534,6 @@ test "runtime init of unnamed packed struct type" { |
| 571 | } | 534 | } |
| 572 | 535 | ||
| 573 | test "packed struct passed to callconv(.C) function" { | 536 | test "packed struct passed to callconv(.C) function" { |
| 574 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 575 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 537 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 576 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 538 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 577 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 539 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
test/behavior/packed_struct_explicit_backing_int.zig-1| ... | @@ -5,7 +5,6 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -5,7 +5,6 @@ const expectEqual = std.testing.expectEqual; |
| 5 | const native_endian = builtin.cpu.arch.endian(); | 5 | const native_endian = builtin.cpu.arch.endian(); |
| 6 | 6 | ||
| 7 | test "packed struct explicit backing integer" { | 7 | test "packed struct explicit backing integer" { |
| 8 | assert(builtin.zig_backend != .stage1); | ||
| 9 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 8 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 10 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 9 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/pointers.zig-3| ... | @@ -135,9 +135,6 @@ test "peer type resolution with C pointers" { | ... | @@ -135,9 +135,6 @@ test "peer type resolution with C pointers" { |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | test "peer type resolution with C pointer and const pointer" { | 137 | test "peer type resolution with C pointer and const pointer" { |
| 138 | // stage1 incorrectly resolves to [*]u8 | ||
| 139 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 140 | |||
| 141 | var ptr_c: [*c]u8 = undefined; | 138 | var ptr_c: [*c]u8 = undefined; |
| 142 | const ptr_const: u8 = undefined; | 139 | const ptr_const: u8 = undefined; |
| 143 | try expect(@TypeOf(ptr_c, &ptr_const) == [*c]const u8); | 140 | try expect(@TypeOf(ptr_c, &ptr_const) == [*c]const u8); |
test/behavior/popcount.zig-1| ... | @@ -65,7 +65,6 @@ fn testPopCountIntegers() !void { | ... | @@ -65,7 +65,6 @@ fn testPopCountIntegers() !void { |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | test "@popCount vectors" { | 67 | test "@popCount vectors" { |
| 68 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 69 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 68 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 70 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 69 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 71 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 70 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/ptrcast.zig-7| ... | @@ -20,7 +20,6 @@ fn testReinterpretBytesAsInteger() !void { | ... | @@ -20,7 +20,6 @@ fn testReinterpretBytesAsInteger() !void { |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | test "reinterpret an array over multiple elements, with no well-defined layout" { | 22 | test "reinterpret an array over multiple elements, with no well-defined layout" { |
| 23 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 24 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 23 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 25 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 24 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 26 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 25 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -77,8 +76,6 @@ fn testReinterpretBytesAsExternStruct() !void { | ... | @@ -77,8 +76,6 @@ fn testReinterpretBytesAsExternStruct() !void { |
| 77 | } | 76 | } |
| 78 | 77 | ||
| 79 | test "reinterpret bytes of an extern struct (with under-aligned fields) into another" { | 78 | test "reinterpret bytes of an extern struct (with under-aligned fields) into another" { |
| 80 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 81 | |||
| 82 | try testReinterpretExternStructAsExternStruct(); | 79 | try testReinterpretExternStructAsExternStruct(); |
| 83 | comptime try testReinterpretExternStructAsExternStruct(); | 80 | comptime try testReinterpretExternStructAsExternStruct(); |
| 84 | } | 81 | } |
| ... | @@ -101,8 +98,6 @@ fn testReinterpretExternStructAsExternStruct() !void { | ... | @@ -101,8 +98,6 @@ fn testReinterpretExternStructAsExternStruct() !void { |
| 101 | } | 98 | } |
| 102 | 99 | ||
| 103 | test "reinterpret bytes of an extern struct into another" { | 100 | test "reinterpret bytes of an extern struct into another" { |
| 104 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 105 | |||
| 106 | try testReinterpretOverAlignedExternStructAsExternStruct(); | 101 | try testReinterpretOverAlignedExternStructAsExternStruct(); |
| 107 | comptime try testReinterpretOverAlignedExternStructAsExternStruct(); | 102 | comptime try testReinterpretOverAlignedExternStructAsExternStruct(); |
| 108 | } | 103 | } |
| ... | @@ -127,7 +122,6 @@ fn testReinterpretOverAlignedExternStructAsExternStruct() !void { | ... | @@ -127,7 +122,6 @@ fn testReinterpretOverAlignedExternStructAsExternStruct() !void { |
| 127 | } | 122 | } |
| 128 | 123 | ||
| 129 | test "lower reinterpreted comptime field ptr (with under-aligned fields)" { | 124 | test "lower reinterpreted comptime field ptr (with under-aligned fields)" { |
| 130 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 131 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 125 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 132 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 126 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 133 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 127 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -151,7 +145,6 @@ test "lower reinterpreted comptime field ptr (with under-aligned fields)" { | ... | @@ -151,7 +145,6 @@ test "lower reinterpreted comptime field ptr (with under-aligned fields)" { |
| 151 | } | 145 | } |
| 152 | 146 | ||
| 153 | test "lower reinterpreted comptime field ptr" { | 147 | test "lower reinterpreted comptime field ptr" { |
| 154 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 155 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 148 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 156 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 149 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 157 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/saturating_arithmetic.zig-4| ... | @@ -149,10 +149,6 @@ test "saturating multiplication" { | ... | @@ -149,10 +149,6 @@ test "saturating multiplication" { |
| 149 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 149 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 150 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 150 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 151 | 151 | ||
| 152 | if (builtin.zig_backend == .stage1 and builtin.cpu.arch == .wasm32) { | ||
| 153 | // https://github.com/ziglang/zig/issues/9660 | ||
| 154 | return error.SkipZigTest; | ||
| 155 | } | ||
| 156 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { | 152 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .wasm32) { |
| 157 | // https://github.com/ziglang/zig/issues/9660 | 153 | // https://github.com/ziglang/zig/issues/9660 |
| 158 | return error.SkipZigTest; | 154 | return error.SkipZigTest; |
test/behavior/select.zig-1| ... | @@ -32,7 +32,6 @@ fn selectVectors() !void { | ... | @@ -32,7 +32,6 @@ fn selectVectors() !void { |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | test "@select arrays" { | 34 | test "@select arrays" { |
| 35 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // TODO | ||
| 36 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 35 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 37 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 36 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 38 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 37 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/shuffle.zig+1-1| ... | @@ -71,7 +71,7 @@ test "@shuffle bool 2" { | ... | @@ -71,7 +71,7 @@ test "@shuffle bool 2" { |
| 71 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 71 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 72 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 72 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 73 | 73 | ||
| 74 | if (builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) { | 74 | if (builtin.zig_backend == .stage2_llvm) { |
| 75 | // https://github.com/ziglang/zig/issues/3246 | 75 | // https://github.com/ziglang/zig/issues/3246 |
| 76 | return error.SkipZigTest; | 76 | return error.SkipZigTest; |
| 77 | } | 77 | } |
test/behavior/sizeof_and_typeof.zig-53| ... | @@ -101,52 +101,6 @@ test "@offsetOf" { | ... | @@ -101,52 +101,6 @@ test "@offsetOf" { |
| 101 | try expect(@ptrToInt(&a.i) - @ptrToInt(&a) == @offsetOf(A, "i")); | 101 | try expect(@ptrToInt(&a.i) - @ptrToInt(&a) == @offsetOf(A, "i")); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | test "@offsetOf packed struct, array length not power of 2 or multiple of native pointer width in bytes" { | ||
| 105 | // Stage2 has different packed struct semantics. | ||
| 106 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | ||
| 107 | const p3a_len = 3; | ||
| 108 | const P3 = packed struct { | ||
| 109 | a: [p3a_len]u8, | ||
| 110 | b: usize, | ||
| 111 | }; | ||
| 112 | try std.testing.expect(0 == @offsetOf(P3, "a")); | ||
| 113 | try std.testing.expect(p3a_len == @offsetOf(P3, "b")); | ||
| 114 | |||
| 115 | const p5a_len = 5; | ||
| 116 | const P5 = packed struct { | ||
| 117 | a: [p5a_len]u8, | ||
| 118 | b: usize, | ||
| 119 | }; | ||
| 120 | try std.testing.expect(0 == @offsetOf(P5, "a")); | ||
| 121 | try std.testing.expect(p5a_len == @offsetOf(P5, "b")); | ||
| 122 | |||
| 123 | const p6a_len = 6; | ||
| 124 | const P6 = packed struct { | ||
| 125 | a: [p6a_len]u8, | ||
| 126 | b: usize, | ||
| 127 | }; | ||
| 128 | try std.testing.expect(0 == @offsetOf(P6, "a")); | ||
| 129 | try std.testing.expect(p6a_len == @offsetOf(P6, "b")); | ||
| 130 | |||
| 131 | const p7a_len = 7; | ||
| 132 | const P7 = packed struct { | ||
| 133 | a: [p7a_len]u8, | ||
| 134 | b: usize, | ||
| 135 | }; | ||
| 136 | try std.testing.expect(0 == @offsetOf(P7, "a")); | ||
| 137 | try std.testing.expect(p7a_len == @offsetOf(P7, "b")); | ||
| 138 | |||
| 139 | const p9a_len = 9; | ||
| 140 | const P9 = packed struct { | ||
| 141 | a: [p9a_len]u8, | ||
| 142 | b: usize, | ||
| 143 | }; | ||
| 144 | try std.testing.expect(0 == @offsetOf(P9, "a")); | ||
| 145 | try std.testing.expect(p9a_len == @offsetOf(P9, "b")); | ||
| 146 | |||
| 147 | // 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25 etc. are further cases | ||
| 148 | } | ||
| 149 | |||
| 150 | test "@bitOffsetOf" { | 104 | test "@bitOffsetOf" { |
| 151 | // Packed structs have fixed memory layout | 105 | // Packed structs have fixed memory layout |
| 152 | try expect(@bitOffsetOf(P, "a") == 0); | 106 | try expect(@bitOffsetOf(P, "a") == 0); |
| ... | @@ -211,8 +165,6 @@ test "branching logic inside @TypeOf" { | ... | @@ -211,8 +165,6 @@ test "branching logic inside @TypeOf" { |
| 211 | } | 165 | } |
| 212 | 166 | ||
| 213 | test "@bitSizeOf" { | 167 | test "@bitSizeOf" { |
| 214 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 215 | |||
| 216 | try expect(@bitSizeOf(u2) == 2); | 168 | try expect(@bitSizeOf(u2) == 2); |
| 217 | try expect(@bitSizeOf(u8) == @sizeOf(u8) * 8); | 169 | try expect(@bitSizeOf(u8) == @sizeOf(u8) * 8); |
| 218 | try expect(@bitSizeOf(struct { | 170 | try expect(@bitSizeOf(struct { |
| ... | @@ -224,11 +176,6 @@ test "@bitSizeOf" { | ... | @@ -224,11 +176,6 @@ test "@bitSizeOf" { |
| 224 | } | 176 | } |
| 225 | 177 | ||
| 226 | test "@sizeOf comparison against zero" { | 178 | test "@sizeOf comparison against zero" { |
| 227 | if (builtin.zig_backend == .stage1) { | ||
| 228 | // stage1 gets the wrong answer for size of pointers to zero bit types | ||
| 229 | return error.SkipZigTest; | ||
| 230 | } | ||
| 231 | |||
| 232 | const S0 = struct { | 179 | const S0 = struct { |
| 233 | f: *@This(), | 180 | f: *@This(), |
| 234 | }; | 181 | }; |
test/behavior/slice.zig+4-28| ... | @@ -182,7 +182,6 @@ test "slicing zero length array" { | ... | @@ -182,7 +182,6 @@ test "slicing zero length array" { |
| 182 | const x = @intToPtr([*]i32, 0x1000)[0..0x500]; | 182 | const x = @intToPtr([*]i32, 0x1000)[0..0x500]; |
| 183 | const y = x[0x100..]; | 183 | const y = x[0x100..]; |
| 184 | test "compile time slice of pointer to hard coded address" { | 184 | test "compile time slice of pointer to hard coded address" { |
| 185 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 186 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 185 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 187 | 186 | ||
| 188 | try expect(@ptrToInt(x) == 0x1000); | 187 | try expect(@ptrToInt(x) == 0x1000); |
| ... | @@ -444,10 +443,7 @@ test "slice syntax resulting in pointer-to-array" { | ... | @@ -444,10 +443,7 @@ test "slice syntax resulting in pointer-to-array" { |
| 444 | var array: [2]u8 = [2]u8{ 1, 2 }; | 443 | var array: [2]u8 = [2]u8{ 1, 2 }; |
| 445 | var slice: ?[]u8 = &array; | 444 | var slice: ?[]u8 = &array; |
| 446 | comptime try expect(@TypeOf(&array, slice) == ?[]u8); | 445 | comptime try expect(@TypeOf(&array, slice) == ?[]u8); |
| 447 | if (builtin.zig_backend != .stage1) { | 446 | comptime try expect(@TypeOf(slice, &array) == ?[]u8); |
| 448 | // stage1 is not passing this case | ||
| 449 | comptime try expect(@TypeOf(slice, &array) == ?[]u8); | ||
| 450 | } | ||
| 451 | comptime try expect(@TypeOf(slice.?[0..2]) == *[2]u8); | 447 | comptime try expect(@TypeOf(slice.?[0..2]) == *[2]u8); |
| 452 | } | 448 | } |
| 453 | 449 | ||
| ... | @@ -479,13 +475,7 @@ test "slice pointer-to-array null terminated" { | ... | @@ -479,13 +475,7 @@ test "slice pointer-to-array null terminated" { |
| 479 | var slice: [:0]u8 = &array; | 475 | var slice: [:0]u8 = &array; |
| 480 | try expect(@TypeOf(slice[1..3]) == *[2]u8); | 476 | try expect(@TypeOf(slice[1..3]) == *[2]u8); |
| 481 | try expect(@TypeOf(slice[1..3 :4]) == *[2:4]u8); | 477 | try expect(@TypeOf(slice[1..3 :4]) == *[2:4]u8); |
| 482 | 478 | try expect(@TypeOf(slice[1..]) == *[4:0]u8); | |
| 483 | if (builtin.zig_backend == .stage1) { | ||
| 484 | try expect(@TypeOf(slice[1..]) == [:0]u8); | ||
| 485 | } else { | ||
| 486 | // stage2 gives a more accurate, correct answer | ||
| 487 | try expect(@TypeOf(slice[1..]) == *[4:0]u8); | ||
| 488 | } | ||
| 489 | } | 479 | } |
| 490 | 480 | ||
| 491 | var array = [5:0]u8{ 1, 2, 3, 4, 5 }; | 481 | var array = [5:0]u8{ 1, 2, 3, 4, 5 }; |
| ... | @@ -509,12 +499,7 @@ test "slice pointer-to-array zero length" { | ... | @@ -509,12 +499,7 @@ test "slice pointer-to-array zero length" { |
| 509 | var array = [0:0]u8{}; | 499 | var array = [0:0]u8{}; |
| 510 | var src_slice: [:0]u8 = &array; | 500 | var src_slice: [:0]u8 = &array; |
| 511 | var slice = src_slice[0..0]; | 501 | var slice = src_slice[0..0]; |
| 512 | if (builtin.zig_backend == .stage1) { | 502 | try expect(@TypeOf(slice) == *[0:0]u8); |
| 513 | try expect(@TypeOf(slice) == *[0]u8); | ||
| 514 | } else { | ||
| 515 | // stage2 gives a more accurate, correct answer | ||
| 516 | try expect(@TypeOf(slice) == *[0:0]u8); | ||
| 517 | } | ||
| 518 | } | 503 | } |
| 519 | } | 504 | } |
| 520 | 505 | ||
| ... | @@ -573,16 +558,11 @@ test "array concat of slices gives ptr to array" { | ... | @@ -573,16 +558,11 @@ test "array concat of slices gives ptr to array" { |
| 573 | var b: []const u8 = "asdf"; | 558 | var b: []const u8 = "asdf"; |
| 574 | const c = a ++ b; | 559 | const c = a ++ b; |
| 575 | try expect(std.mem.eql(u8, c, "aoeuasdf")); | 560 | try expect(std.mem.eql(u8, c, "aoeuasdf")); |
| 576 | if (builtin.zig_backend != .stage1) { | 561 | try expect(@TypeOf(c) == *const [8]u8); |
| 577 | // spec change: array concat now returns pointer-to-array for slices | ||
| 578 | try expect(@TypeOf(c) == *const [8]u8); | ||
| 579 | } | ||
| 580 | } | 562 | } |
| 581 | } | 563 | } |
| 582 | 564 | ||
| 583 | test "array mult of slice gives ptr to array" { | 565 | test "array mult of slice gives ptr to array" { |
| 584 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; // Stage 1 does not support multiplying slices | ||
| 585 | |||
| 586 | comptime { | 566 | comptime { |
| 587 | var a: []const u8 = "aoeu"; | 567 | var a: []const u8 = "aoeu"; |
| 588 | const c = a ** 2; | 568 | const c = a ** 2; |
| ... | @@ -626,8 +606,6 @@ test "slice sentinel access at comptime" { | ... | @@ -626,8 +606,6 @@ test "slice sentinel access at comptime" { |
| 626 | } | 606 | } |
| 627 | 607 | ||
| 628 | test "slicing array with sentinel as end index" { | 608 | test "slicing array with sentinel as end index" { |
| 629 | // Doesn't work in stage1 | ||
| 630 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 631 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 609 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 632 | 610 | ||
| 633 | const S = struct { | 611 | const S = struct { |
| ... | @@ -645,8 +623,6 @@ test "slicing array with sentinel as end index" { | ... | @@ -645,8 +623,6 @@ test "slicing array with sentinel as end index" { |
| 645 | } | 623 | } |
| 646 | 624 | ||
| 647 | test "slicing slice with sentinel as end index" { | 625 | test "slicing slice with sentinel as end index" { |
| 648 | // Doesn't work in stage1 | ||
| 649 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 650 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 626 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 651 | 627 | ||
| 652 | const S = struct { | 628 | const S = struct { |
test/behavior/struct.zig+2-40| ... | @@ -419,11 +419,8 @@ test "packed struct 24bits" { | ... | @@ -419,11 +419,8 @@ test "packed struct 24bits" { |
| 419 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 419 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 420 | 420 | ||
| 421 | comptime { | 421 | comptime { |
| 422 | // stage1 gets the wrong answer for sizeof | 422 | std.debug.assert(@sizeOf(Foo24Bits) == @sizeOf(u24)); |
| 423 | if (builtin.zig_backend != .stage1) { | 423 | std.debug.assert(@sizeOf(Foo96Bits) == @sizeOf(u96)); |
| 424 | std.debug.assert(@sizeOf(Foo24Bits) == @sizeOf(u24)); | ||
| 425 | std.debug.assert(@sizeOf(Foo96Bits) == @sizeOf(u96)); | ||
| 426 | } | ||
| 427 | } | 424 | } |
| 428 | 425 | ||
| 429 | var value = Foo96Bits{ | 426 | var value = Foo96Bits{ |
| ... | @@ -497,10 +494,6 @@ const Bitfields = packed struct { | ... | @@ -497,10 +494,6 @@ const Bitfields = packed struct { |
| 497 | }; | 494 | }; |
| 498 | 495 | ||
| 499 | test "packed struct fields are ordered from LSB to MSB" { | 496 | test "packed struct fields are ordered from LSB to MSB" { |
| 500 | if (builtin.zig_backend == .stage1) { | ||
| 501 | // stage1 gets the wrong answer for a lot of targets | ||
| 502 | return error.SkipZigTest; | ||
| 503 | } | ||
| 504 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 497 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 505 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 498 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 506 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 499 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -640,7 +633,6 @@ test "default struct initialization fields" { | ... | @@ -640,7 +633,6 @@ test "default struct initialization fields" { |
| 640 | } | 633 | } |
| 641 | 634 | ||
| 642 | test "packed array 24bits" { | 635 | test "packed array 24bits" { |
| 643 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 644 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 636 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 645 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 637 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 646 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 638 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| ... | @@ -698,25 +690,6 @@ const FooArray24Bits = packed struct { | ... | @@ -698,25 +690,6 @@ const FooArray24Bits = packed struct { |
| 698 | c: u16, | 690 | c: u16, |
| 699 | }; | 691 | }; |
| 700 | 692 | ||
| 701 | test "aligned array of packed struct" { | ||
| 702 | // Stage2 has different packed struct semantics. | ||
| 703 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | ||
| 704 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | ||
| 705 | |||
| 706 | comptime { | ||
| 707 | try expect(@sizeOf(FooStructAligned) == 2); | ||
| 708 | try expect(@sizeOf(FooArrayOfAligned) == 2 * 2); | ||
| 709 | } | ||
| 710 | |||
| 711 | var bytes = [_]u8{0xbb} ** @sizeOf(FooArrayOfAligned); | ||
| 712 | const ptr = &std.mem.bytesAsSlice(FooArrayOfAligned, bytes[0..])[0]; | ||
| 713 | |||
| 714 | try expect(ptr.a[0].a == 0xbb); | ||
| 715 | try expect(ptr.a[0].b == 0xbb); | ||
| 716 | try expect(ptr.a[1].a == 0xbb); | ||
| 717 | try expect(ptr.a[1].b == 0xbb); | ||
| 718 | } | ||
| 719 | |||
| 720 | const FooStructAligned = packed struct { | 693 | const FooStructAligned = packed struct { |
| 721 | a: u8, | 694 | a: u8, |
| 722 | b: u8, | 695 | b: u8, |
| ... | @@ -1150,7 +1123,6 @@ test "for loop over pointers to struct, getting field from struct pointer" { | ... | @@ -1150,7 +1123,6 @@ test "for loop over pointers to struct, getting field from struct pointer" { |
| 1150 | } | 1123 | } |
| 1151 | 1124 | ||
| 1152 | test "anon init through error unions and optionals" { | 1125 | test "anon init through error unions and optionals" { |
| 1153 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1154 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1126 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1155 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1127 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1156 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1128 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -1178,7 +1150,6 @@ test "anon init through error unions and optionals" { | ... | @@ -1178,7 +1150,6 @@ test "anon init through error unions and optionals" { |
| 1178 | } | 1150 | } |
| 1179 | 1151 | ||
| 1180 | test "anon init through optional" { | 1152 | test "anon init through optional" { |
| 1181 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1182 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1153 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1183 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1154 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1184 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1155 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -1199,7 +1170,6 @@ test "anon init through optional" { | ... | @@ -1199,7 +1170,6 @@ test "anon init through optional" { |
| 1199 | } | 1170 | } |
| 1200 | 1171 | ||
| 1201 | test "anon init through error union" { | 1172 | test "anon init through error union" { |
| 1202 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1203 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1173 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1204 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1174 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1205 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1175 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -1220,7 +1190,6 @@ test "anon init through error union" { | ... | @@ -1220,7 +1190,6 @@ test "anon init through error union" { |
| 1220 | } | 1190 | } |
| 1221 | 1191 | ||
| 1222 | test "typed init through error unions and optionals" { | 1192 | test "typed init through error unions and optionals" { |
| 1223 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1224 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1193 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1225 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1194 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1226 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1195 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -1283,10 +1252,6 @@ test "loading a struct pointer perfoms a copy" { | ... | @@ -1283,10 +1252,6 @@ test "loading a struct pointer perfoms a copy" { |
| 1283 | } | 1252 | } |
| 1284 | 1253 | ||
| 1285 | test "packed struct aggregate init" { | 1254 | test "packed struct aggregate init" { |
| 1286 | if (builtin.zig_backend == .stage1) { | ||
| 1287 | // stage1 fails this test on mips | ||
| 1288 | return error.SkipZigTest; | ||
| 1289 | } | ||
| 1290 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1255 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1291 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1256 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1292 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1257 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -1328,8 +1293,6 @@ test "packed struct field access via pointer" { | ... | @@ -1328,8 +1293,6 @@ test "packed struct field access via pointer" { |
| 1328 | } | 1293 | } |
| 1329 | 1294 | ||
| 1330 | test "store to comptime field" { | 1295 | test "store to comptime field" { |
| 1331 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1332 | |||
| 1333 | { | 1296 | { |
| 1334 | const S = struct { | 1297 | const S = struct { |
| 1335 | comptime a: [2]u32 = [2]u32{ 1, 2 }, | 1298 | comptime a: [2]u32 = [2]u32{ 1, 2 }, |
| ... | @@ -1364,7 +1327,6 @@ test "struct field init value is size of the struct" { | ... | @@ -1364,7 +1327,6 @@ test "struct field init value is size of the struct" { |
| 1364 | } | 1327 | } |
| 1365 | 1328 | ||
| 1366 | test "under-aligned struct field" { | 1329 | test "under-aligned struct field" { |
| 1367 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1368 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 1330 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 1369 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1331 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1370 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1332 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
test/behavior/truncate.zig-5| ... | @@ -60,11 +60,6 @@ test "truncate on comptime integer" { | ... | @@ -60,11 +60,6 @@ test "truncate on comptime integer" { |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | test "truncate on vectors" { | 62 | test "truncate on vectors" { |
| 63 | if (builtin.zig_backend == .stage1) { | ||
| 64 | // stage1 fails the comptime test | ||
| 65 | return error.SkipZigTest; | ||
| 66 | } | ||
| 67 | |||
| 68 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 63 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 69 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 64 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 70 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 65 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
test/behavior/type.zig+2-11| ... | @@ -229,7 +229,7 @@ test "Type.Vector" { | ... | @@ -229,7 +229,7 @@ test "Type.Vector" { |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | test "Type.AnyFrame" { | 231 | test "Type.AnyFrame" { |
| 232 | if (builtin.zig_backend != .stage1) { | 232 | if (true) { |
| 233 | // https://github.com/ziglang/zig/issues/6025 | 233 | // https://github.com/ziglang/zig/issues/6025 |
| 234 | return error.SkipZigTest; | 234 | return error.SkipZigTest; |
| 235 | } | 235 | } |
| ... | @@ -246,8 +246,6 @@ fn add(a: i32, b: i32) i32 { | ... | @@ -246,8 +246,6 @@ fn add(a: i32, b: i32) i32 { |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | test "Type.ErrorSet" { | 248 | test "Type.ErrorSet" { |
| 249 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 250 | |||
| 251 | try testing.expect(@Type(.{ .ErrorSet = null }) == anyerror); | 249 | try testing.expect(@Type(.{ .ErrorSet = null }) == anyerror); |
| 252 | 250 | ||
| 253 | // error sets don't compare equal so just check if they compile | 251 | // error sets don't compare equal so just check if they compile |
| ... | @@ -369,12 +367,7 @@ test "Type.Enum" { | ... | @@ -369,12 +367,7 @@ test "Type.Enum" { |
| 369 | try testing.expectEqual(@as(u8, 5), @enumToInt(Foo.b)); | 367 | try testing.expectEqual(@as(u8, 5), @enumToInt(Foo.b)); |
| 370 | const Bar = @Type(.{ | 368 | const Bar = @Type(.{ |
| 371 | .Enum = .{ | 369 | .Enum = .{ |
| 372 | // stage2 only has auto layouts | 370 | .layout = .Auto, |
| 373 | .layout = if (builtin.zig_backend == .stage1) | ||
| 374 | .Extern | ||
| 375 | else | ||
| 376 | .Auto, | ||
| 377 | |||
| 378 | .tag_type = u32, | 371 | .tag_type = u32, |
| 379 | .fields = &.{ | 372 | .fields = &.{ |
| 380 | .{ .name = "a", .value = 1 }, | 373 | .{ .name = "a", .value = 1 }, |
| ... | @@ -501,8 +494,6 @@ test "Type.Union from regular enum" { | ... | @@ -501,8 +494,6 @@ test "Type.Union from regular enum" { |
| 501 | } | 494 | } |
| 502 | 495 | ||
| 503 | test "Type.Fn" { | 496 | test "Type.Fn" { |
| 504 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 505 | |||
| 506 | if (true) { | 497 | if (true) { |
| 507 | // https://github.com/ziglang/zig/issues/12360 | 498 | // https://github.com/ziglang/zig/issues/12360 |
| 508 | return error.SkipZigTest; | 499 | return error.SkipZigTest; |
test/behavior/type_info.zig+17-26| ... | @@ -201,9 +201,6 @@ test "type info: error set single value" { | ... | @@ -201,9 +201,6 @@ test "type info: error set single value" { |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | test "type info: error set merged" { | 203 | test "type info: error set merged" { |
| 204 | // #11022 forces ordering of error sets in stage2 | ||
| 205 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 206 | |||
| 207 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 204 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 208 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 205 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 209 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 206 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -305,8 +302,6 @@ const TestStruct = struct { | ... | @@ -305,8 +302,6 @@ const TestStruct = struct { |
| 305 | }; | 302 | }; |
| 306 | 303 | ||
| 307 | test "type info: packed struct info" { | 304 | test "type info: packed struct info" { |
| 308 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 309 | |||
| 310 | try testPackedStruct(); | 305 | try testPackedStruct(); |
| 311 | comptime try testPackedStruct(); | 306 | comptime try testPackedStruct(); |
| 312 | } | 307 | } |
| ... | @@ -376,25 +371,21 @@ extern fn typeInfoFoo(a: usize, b: bool, ...) callconv(.C) usize; | ... | @@ -376,25 +371,21 @@ extern fn typeInfoFoo(a: usize, b: bool, ...) callconv(.C) usize; |
| 376 | extern fn typeInfoFooAligned(a: usize, b: bool, ...) align(4) callconv(.C) usize; | 371 | extern fn typeInfoFooAligned(a: usize, b: bool, ...) align(4) callconv(.C) usize; |
| 377 | 372 | ||
| 378 | test "type info: generic function types" { | 373 | test "type info: generic function types" { |
| 379 | if (builtin.zig_backend != .stage1) { | 374 | const G1 = @typeInfo(@TypeOf(generic1)); |
| 380 | // stage1 marks all args/return types as null if the function | 375 | try expect(G1.Fn.args.len == 1); |
| 381 | // is generic at all. stage2 is more specific. | 376 | try expect(G1.Fn.args[0].is_generic == true); |
| 382 | const G1 = @typeInfo(@TypeOf(generic1)); | 377 | try expect(G1.Fn.args[0].arg_type == null); |
| 383 | try expect(G1.Fn.args.len == 1); | 378 | try expect(G1.Fn.return_type == void); |
| 384 | try expect(G1.Fn.args[0].is_generic == true); | 379 | |
| 385 | try expect(G1.Fn.args[0].arg_type == null); | 380 | const G2 = @typeInfo(@TypeOf(generic2)); |
| 386 | try expect(G1.Fn.return_type == void); | 381 | try expect(G2.Fn.args.len == 3); |
| 387 | 382 | try expect(G2.Fn.args[0].is_generic == false); | |
| 388 | const G2 = @typeInfo(@TypeOf(generic2)); | 383 | try expect(G2.Fn.args[0].arg_type == type); |
| 389 | try expect(G2.Fn.args.len == 3); | 384 | try expect(G2.Fn.args[1].is_generic == true); |
| 390 | try expect(G2.Fn.args[0].is_generic == false); | 385 | try expect(G2.Fn.args[1].arg_type == null); |
| 391 | try expect(G2.Fn.args[0].arg_type == type); | 386 | try expect(G2.Fn.args[2].is_generic == false); |
| 392 | try expect(G2.Fn.args[1].is_generic == true); | 387 | try expect(G2.Fn.args[2].arg_type == u8); |
| 393 | try expect(G2.Fn.args[1].arg_type == null); | 388 | try expect(G2.Fn.return_type == void); |
| 394 | try expect(G2.Fn.args[2].is_generic == false); | ||
| 395 | try expect(G2.Fn.args[2].arg_type == u8); | ||
| 396 | try expect(G2.Fn.return_type == void); | ||
| 397 | } | ||
| 398 | 389 | ||
| 399 | const G3 = @typeInfo(@TypeOf(generic3)); | 390 | const G3 = @typeInfo(@TypeOf(generic3)); |
| 400 | try expect(G3.Fn.args.len == 1); | 391 | try expect(G3.Fn.args.len == 1); |
| ... | @@ -442,7 +433,7 @@ fn testVector() !void { | ... | @@ -442,7 +433,7 @@ fn testVector() !void { |
| 442 | } | 433 | } |
| 443 | 434 | ||
| 444 | test "type info: anyframe and anyframe->T" { | 435 | test "type info: anyframe and anyframe->T" { |
| 445 | if (builtin.zig_backend != .stage1) { | 436 | if (true) { |
| 446 | // https://github.com/ziglang/zig/issues/6025 | 437 | // https://github.com/ziglang/zig/issues/6025 |
| 447 | return error.SkipZigTest; | 438 | return error.SkipZigTest; |
| 448 | } | 439 | } |
| ... | @@ -501,7 +492,7 @@ fn add(a: i32, b: i32) i32 { | ... | @@ -501,7 +492,7 @@ fn add(a: i32, b: i32) i32 { |
| 501 | } | 492 | } |
| 502 | 493 | ||
| 503 | test "type info for async frames" { | 494 | test "type info for async frames" { |
| 504 | if (builtin.zig_backend != .stage1) { | 495 | if (true) { |
| 505 | // https://github.com/ziglang/zig/issues/6025 | 496 | // https://github.com/ziglang/zig/issues/6025 |
| 506 | return error.SkipZigTest; | 497 | return error.SkipZigTest; |
| 507 | } | 498 | } |
test/behavior/typename.zig-29| ... | @@ -12,12 +12,6 @@ const expectStringStartsWith = std.testing.expectStringStartsWith; | ... | @@ -12,12 +12,6 @@ const expectStringStartsWith = std.testing.expectStringStartsWith; |
| 12 | // failures. | 12 | // failures. |
| 13 | 13 | ||
| 14 | test "anon fn param" { | 14 | test "anon fn param" { |
| 15 | if (builtin.zig_backend == .stage1) { | ||
| 16 | // stage1 uses line/column for the names but we're moving away from that for | ||
| 17 | // incremental compilation purposes. | ||
| 18 | return error.SkipZigTest; | ||
| 19 | } | ||
| 20 | |||
| 21 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 15 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 22 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 16 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 23 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 17 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -43,12 +37,6 @@ test "anon fn param" { | ... | @@ -43,12 +37,6 @@ test "anon fn param" { |
| 43 | } | 37 | } |
| 44 | 38 | ||
| 45 | test "anon field init" { | 39 | test "anon field init" { |
| 46 | if (builtin.zig_backend == .stage1) { | ||
| 47 | // stage1 uses line/column for the names but we're moving away from that for | ||
| 48 | // incremental compilation purposes. | ||
| 49 | return error.SkipZigTest; | ||
| 50 | } | ||
| 51 | |||
| 52 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 40 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 53 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 41 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 54 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 42 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -84,11 +72,6 @@ test "basic" { | ... | @@ -84,11 +72,6 @@ test "basic" { |
| 84 | } | 72 | } |
| 85 | 73 | ||
| 86 | test "top level decl" { | 74 | test "top level decl" { |
| 87 | if (builtin.zig_backend == .stage1) { | ||
| 88 | // stage1 fails to return fully qualified namespaces. | ||
| 89 | return error.SkipZigTest; | ||
| 90 | } | ||
| 91 | |||
| 92 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 75 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 93 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 76 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 94 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 77 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -208,11 +191,6 @@ pub fn expectEqualStringsIgnoreDigits(expected: []const u8, actual: []const u8) | ... | @@ -208,11 +191,6 @@ pub fn expectEqualStringsIgnoreDigits(expected: []const u8, actual: []const u8) |
| 208 | } | 191 | } |
| 209 | 192 | ||
| 210 | test "local variable" { | 193 | test "local variable" { |
| 211 | if (builtin.zig_backend == .stage1) { | ||
| 212 | // stage1 fails to return fully qualified namespaces. | ||
| 213 | return error.SkipZigTest; | ||
| 214 | } | ||
| 215 | |||
| 216 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 194 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 217 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 195 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 218 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 196 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -231,7 +209,6 @@ test "local variable" { | ... | @@ -231,7 +209,6 @@ test "local variable" { |
| 231 | } | 209 | } |
| 232 | 210 | ||
| 233 | test "comptime parameters not converted to anytype in function type" { | 211 | test "comptime parameters not converted to anytype in function type" { |
| 234 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 235 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 212 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 236 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 213 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 237 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 214 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| ... | @@ -241,12 +218,6 @@ test "comptime parameters not converted to anytype in function type" { | ... | @@ -241,12 +218,6 @@ test "comptime parameters not converted to anytype in function type" { |
| 241 | } | 218 | } |
| 242 | 219 | ||
| 243 | test "anon name strategy used in sub expression" { | 220 | test "anon name strategy used in sub expression" { |
| 244 | if (builtin.zig_backend == .stage1) { | ||
| 245 | // stage1 uses line/column for the names but we're moving away from that for | ||
| 246 | // incremental compilation purposes. | ||
| 247 | return error.SkipZigTest; | ||
| 248 | } | ||
| 249 | |||
| 250 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 251 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 222 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 252 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 223 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
test/behavior/undefined.zig-4| ... | @@ -76,10 +76,6 @@ test "assign undefined to struct with method" { | ... | @@ -76,10 +76,6 @@ test "assign undefined to struct with method" { |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | test "type name of undefined" { | 78 | test "type name of undefined" { |
| 79 | if (builtin.zig_backend == .stage1) { | ||
| 80 | // stage1 gets the type name wrong | ||
| 81 | return error.SkipZigTest; | ||
| 82 | } | ||
| 83 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 79 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 84 | 80 | ||
| 85 | const x = undefined; | 81 | const x = undefined; |
test/behavior/union.zig-5| ... | @@ -221,7 +221,6 @@ test "packed union generates correctly aligned type" { | ... | @@ -221,7 +221,6 @@ test "packed union generates correctly aligned type" { |
| 221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | 221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 222 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 222 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 223 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 223 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 224 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 225 | 224 | ||
| 226 | const U = packed union { | 225 | const U = packed union { |
| 227 | f1: *const fn () error{TestUnexpectedResult}!void, | 226 | f1: *const fn () error{TestUnexpectedResult}!void, |
| ... | @@ -1002,7 +1001,6 @@ test "cast from pointer to anonymous struct to pointer to union" { | ... | @@ -1002,7 +1001,6 @@ test "cast from pointer to anonymous struct to pointer to union" { |
| 1002 | } | 1001 | } |
| 1003 | 1002 | ||
| 1004 | test "switching on non exhaustive union" { | 1003 | test "switching on non exhaustive union" { |
| 1005 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1006 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1004 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1007 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1005 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1008 | 1006 | ||
| ... | @@ -1197,7 +1195,6 @@ test "union tag is set when initiated as a temporary value at runtime" { | ... | @@ -1197,7 +1195,6 @@ test "union tag is set when initiated as a temporary value at runtime" { |
| 1197 | } | 1195 | } |
| 1198 | 1196 | ||
| 1199 | test "extern union most-aligned field is smaller" { | 1197 | test "extern union most-aligned field is smaller" { |
| 1200 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1201 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1198 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1202 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1199 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1203 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1200 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -1246,7 +1243,6 @@ test "return an extern union from C calling convention" { | ... | @@ -1246,7 +1243,6 @@ test "return an extern union from C calling convention" { |
| 1246 | } | 1243 | } |
| 1247 | 1244 | ||
| 1248 | test "noreturn field in union" { | 1245 | test "noreturn field in union" { |
| 1249 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1250 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1246 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1251 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1247 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1252 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1248 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -1298,7 +1294,6 @@ test "noreturn field in union" { | ... | @@ -1298,7 +1294,6 @@ test "noreturn field in union" { |
| 1298 | } | 1294 | } |
| 1299 | 1295 | ||
| 1300 | test "union and enum field order doesn't match" { | 1296 | test "union and enum field order doesn't match" { |
| 1301 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 1302 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1297 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1303 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1298 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1304 | 1299 |
test/behavior/vector.zig+2-39| ... | @@ -6,12 +6,6 @@ const expect = std.testing.expect; | ... | @@ -6,12 +6,6 @@ const expect = std.testing.expect; |
| 6 | const expectEqual = std.testing.expectEqual; | 6 | const expectEqual = std.testing.expectEqual; |
| 7 | 7 | ||
| 8 | test "implicit cast vector to array - bool" { | 8 | test "implicit cast vector to array - bool" { |
| 9 | if (builtin.zig_backend == .stage1) { | ||
| 10 | // Regressed in LLVM 14: | ||
| 11 | // https://github.com/llvm/llvm-project/issues/55522 | ||
| 12 | return error.SkipZigTest; | ||
| 13 | } | ||
| 14 | |||
| 15 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 9 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 16 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 10 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 17 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 11 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -180,9 +174,7 @@ test "tuple to vector" { | ... | @@ -180,9 +174,7 @@ test "tuple to vector" { |
| 180 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 174 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 181 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 175 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 182 | 176 | ||
| 183 | if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and | 177 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 184 | builtin.cpu.arch == .aarch64) | ||
| 185 | { | ||
| 186 | // Regressed with LLVM 14: | 178 | // Regressed with LLVM 14: |
| 187 | // https://github.com/ziglang/zig/issues/12012 | 179 | // https://github.com/ziglang/zig/issues/12012 |
| 188 | return error.SkipZigTest; | 180 | return error.SkipZigTest; |
| ... | @@ -197,9 +189,7 @@ test "tuple to vector" { | ... | @@ -197,9 +189,7 @@ test "tuple to vector" { |
| 197 | } | 189 | } |
| 198 | 190 | ||
| 199 | try std.testing.expectEqual(v, Vec3{ 1, 1, 1 }); | 191 | try std.testing.expectEqual(v, Vec3{ 1, 1, 1 }); |
| 200 | if (builtin.zig_backend != .stage1) { | 192 | try std.testing.expectEqual(v, .{ 1, 1, 1 }); |
| 201 | try std.testing.expectEqual(v, .{ 1, 1, 1 }); | ||
| 202 | } | ||
| 203 | } | 193 | } |
| 204 | }; | 194 | }; |
| 205 | try S.doTheTest(); | 195 | try S.doTheTest(); |
| ... | @@ -406,12 +396,6 @@ test "initialize vector which is a struct field" { | ... | @@ -406,12 +396,6 @@ test "initialize vector which is a struct field" { |
| 406 | } | 396 | } |
| 407 | 397 | ||
| 408 | test "vector comparison operators" { | 398 | test "vector comparison operators" { |
| 409 | if (builtin.zig_backend == .stage1) { | ||
| 410 | // Regressed in LLVM 14: | ||
| 411 | // https://github.com/llvm/llvm-project/issues/55522 | ||
| 412 | return error.SkipZigTest; | ||
| 413 | } | ||
| 414 | |||
| 415 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 399 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 416 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 400 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 417 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 401 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| ... | @@ -801,7 +785,6 @@ test "vector reduce operation" { | ... | @@ -801,7 +785,6 @@ test "vector reduce operation" { |
| 801 | } | 785 | } |
| 802 | 786 | ||
| 803 | test "vector @reduce comptime" { | 787 | test "vector @reduce comptime" { |
| 804 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | ||
| 805 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 788 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 806 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 789 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 807 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 790 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -937,10 +920,6 @@ test "saturating shift-left" { | ... | @@ -937,10 +920,6 @@ test "saturating shift-left" { |
| 937 | } | 920 | } |
| 938 | 921 | ||
| 939 | test "multiplication-assignment operator with an array operand" { | 922 | test "multiplication-assignment operator with an array operand" { |
| 940 | if (builtin.zig_backend == .stage1) { | ||
| 941 | // stage1 emits a compile error | ||
| 942 | return error.SkipZigTest; | ||
| 943 | } | ||
| 944 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 923 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 945 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 924 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 946 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 925 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -961,10 +940,6 @@ test "multiplication-assignment operator with an array operand" { | ... | @@ -961,10 +940,6 @@ test "multiplication-assignment operator with an array operand" { |
| 961 | } | 940 | } |
| 962 | 941 | ||
| 963 | test "@addWithOverflow" { | 942 | test "@addWithOverflow" { |
| 964 | if (builtin.zig_backend == .stage1) { | ||
| 965 | // stage1 doesn't support vector args | ||
| 966 | return error.SkipZigTest; | ||
| 967 | } | ||
| 968 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 943 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 969 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 944 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 970 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 945 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -1011,10 +986,6 @@ test "@addWithOverflow" { | ... | @@ -1011,10 +986,6 @@ test "@addWithOverflow" { |
| 1011 | } | 986 | } |
| 1012 | 987 | ||
| 1013 | test "@subWithOverflow" { | 988 | test "@subWithOverflow" { |
| 1014 | if (builtin.zig_backend == .stage1) { | ||
| 1015 | // stage1 doesn't support vector args | ||
| 1016 | return error.SkipZigTest; | ||
| 1017 | } | ||
| 1018 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 989 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1019 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 990 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1020 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 991 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -1045,10 +1016,6 @@ test "@subWithOverflow" { | ... | @@ -1045,10 +1016,6 @@ test "@subWithOverflow" { |
| 1045 | } | 1016 | } |
| 1046 | 1017 | ||
| 1047 | test "@mulWithOverflow" { | 1018 | test "@mulWithOverflow" { |
| 1048 | if (builtin.zig_backend == .stage1) { | ||
| 1049 | // stage1 doesn't support vector args | ||
| 1050 | return error.SkipZigTest; | ||
| 1051 | } | ||
| 1052 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1019 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1053 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1020 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1054 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1021 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| ... | @@ -1069,10 +1036,6 @@ test "@mulWithOverflow" { | ... | @@ -1069,10 +1036,6 @@ test "@mulWithOverflow" { |
| 1069 | } | 1036 | } |
| 1070 | 1037 | ||
| 1071 | test "@shlWithOverflow" { | 1038 | test "@shlWithOverflow" { |
| 1072 | if (builtin.zig_backend == .stage1) { | ||
| 1073 | // stage1 doesn't support vector args | ||
| 1074 | return error.SkipZigTest; | ||
| 1075 | } | ||
| 1076 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 1039 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 1077 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1040 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1078 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 1041 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/while.zig+7| ... | @@ -364,3 +364,10 @@ test "try terminating an infinite loop" { | ... | @@ -364,3 +364,10 @@ test "try terminating an infinite loop" { |
| 364 | _ = try Foo.bar(); | 364 | _ = try Foo.bar(); |
| 365 | } else unreachable); | 365 | } else unreachable); |
| 366 | } | 366 | } |
| 367 | |||
| 368 | test "while loop with comptime true condition needs no else block to return value with break" { | ||
| 369 | const x = while (true) { | ||
| 370 | break @as(u32, 69); | ||
| 371 | }; | ||
| 372 | try expect(x == 69); | ||
| 373 | } |