diff --git a/build.zig b/build.zig index 93ef1a66c8..6488c28436 100644 --- a/build.zig +++ b/build.zig @@ -9,6 +9,7 @@ const InstallDirectoryOptions = std.Build.InstallDirectoryOptions; const assert = std.debug.assert; const DevEnv = @import("src/dev.zig").Env; const ValueInterpretMode = enum { direct, by_name }; +const corpus = @import("stage0/corpus.zig"); const zig0_headers = &[_][]const u8{ "air.h", @@ -1699,25 +1700,9 @@ fn addZig0TestStep( test_timeout: ?[]const u8, exe_options: *std.Build.Step.Options, ) void { - // Step 1: Compile Zig test code to .o (cached independently of C objects). - // NOTE: test_mod does NOT import zig_internals — stage0 tests are fast. - const test_mod = b.createModule(.{ - .root_source_file = b.path("stage0_test_root.zig"), - .optimize = optimize, - .target = target, - .valgrind = true, - }); - test_mod.addIncludePath(b.path("stage0")); - test_mod.linkSystemLibrary("c", .{}); - - const test_obj = b.addTest(.{ - .root_module = test_mod, - .emit_object = true, - .use_llvm = false, - .use_lld = false, - }); - - // Step 1b: Compile Zig dumper module (depends on zig_internals, cached separately). + // Step 0: Build AIR generator and generate air_bundle.zig. + // The generator uses zig_internals to compile source files and + // produces pre-computed AIR data + tag names in a single Zig file. const zig_internals_mod = b.createModule(.{ .root_source_file = b.path("src/test_exports.zig"), }); @@ -1738,25 +1723,72 @@ fn addZig0TestStep( // processing empty Air. ReleaseFast elides the safety check. const dumper_mod = b.createModule(.{ .root_source_file = b.path("src/verbose_air.zig"), - .target = target, + .target = b.graph.host, .optimize = .ReleaseFast, - .valgrind = true, }); dumper_mod.addImport("zig_internals", zig_internals_mod); dumper_mod.linkSystemLibrary("c", .{}); - const dumper_obj = b.addObject(.{ - .name = "verbose_dumper", - .root_module = dumper_mod, + const gen_mod = b.createModule(.{ + .root_source_file = b.path("src/verbose_air_gen.zig"), + .target = b.graph.host, + .optimize = .ReleaseFast, + }); + gen_mod.addImport("verbose_air", dumper_mod); + gen_mod.addImport("zig_internals", zig_internals_mod); + gen_mod.linkSystemLibrary("c", .{}); + + const gen_exe = b.addExecutable(.{ + .name = "air_gen", + .root_module = gen_mod, }); - // Step 2: Link test_obj + dumper_obj + C objects into final executable. + // Run generator: air_gen [ ]... + const gen_run = b.addRunArtifact(gen_exe); + const air_dir = gen_run.addOutputDirectoryArg("air"); + // Add corpus files as name/path pairs. + for (corpus.files[0..corpus.num_passing]) |path| { + gen_run.addArg(path); + gen_run.addFileArg(b.path(path)); + } + // Add sema unit test files. + for (corpus.sema_unit_tests) |path| { + gen_run.addArg(path); + gen_run.addFileArg(b.path(path)); + } + + // Step 1: Compile Zig test code to .o (cached independently of C objects). + // NOTE: test_mod does NOT import zig_internals — stage0 tests are fast. + const test_mod = b.createModule(.{ + .root_source_file = b.path("stage0_test_root.zig"), + .optimize = optimize, + .target = target, + .valgrind = true, + }); + test_mod.addIncludePath(b.path("stage0")); + test_mod.linkSystemLibrary("c", .{}); + // Make pre-computed AIR data available to tests. + test_mod.addAnonymousImport("air_tag_names", .{ + .root_source_file = air_dir.path(b, "tag_names.zig"), + }); + test_mod.addAnonymousImport("air_data", .{ + .root_source_file = air_dir.path(b, "air_data.zig"), + }); + + const test_obj = b.addTest(.{ + .root_module = test_mod, + .emit_object = true, + .use_llvm = false, + .use_lld = false, + }); + + // Step 2: Link test_obj + C objects into final executable. + // No more dumper_obj — AIR is pre-computed at build time. const link_mod = b.createModule(.{ .target = target, .optimize = optimize, }); link_mod.addObject(test_obj); - link_mod.addObject(dumper_obj); addZig0CSources(b, link_mod, cc, optimize); link_mod.linkSystemLibrary("c", .{}); diff --git a/src/verbose_air.zig b/src/verbose_air.zig index 9311556012..07bce6f762 100644 --- a/src/verbose_air.zig +++ b/src/verbose_air.zig @@ -11,7 +11,7 @@ const Package = zig_internals.Package; const Air = zig_internals.Air; /// Matches C `Air` struct layout (air.h). -const CAir = extern struct { +pub const CAir = extern struct { inst_len: u32, inst_cap: u32, inst_tags: ?[*]u8, @@ -22,13 +22,13 @@ const CAir = extern struct { }; /// Matches C `SemaFuncAir` struct layout (sema.h). -const CSemaFuncAir = extern struct { +pub const CSemaFuncAir = extern struct { name: ?[*:0]u8, func_ip: u32, // InternPoolIndex air: CAir, }; -const CompileAirResult = extern struct { +pub const CompileAirResult = extern struct { items: ?[*]CSemaFuncAir, len: u32, callback_count: u32, @@ -132,7 +132,7 @@ export fn zig_compile_air( }; } -export fn zig_compile_air_free(result: *CompileAirResult) void { +pub export fn zig_compile_air_free(result: *CompileAirResult) void { const gpa = std.heap.c_allocator; if (result.items) |items| { for (items[0..result.len]) |*f| { @@ -153,7 +153,7 @@ fn setErr(buf: *[err_buf_size]u8, comptime fmt: []const u8, args: anytype) void buf[written.len] = 0; } -fn zigCompileAirImpl( +pub fn zigCompileAirImpl( src_path: []const u8, module_root_opt: ?[]const u8, err_buf: *[err_buf_size]u8, diff --git a/src/verbose_air_gen.zig b/src/verbose_air_gen.zig new file mode 100644 index 0000000000..d0ffb75b30 --- /dev/null +++ b/src/verbose_air_gen.zig @@ -0,0 +1,232 @@ +// verbose_air_gen.zig — Build-time generator for pre-computed AIR data. +// Compiles each source file via the Zig compiler pipeline and writes +// binary .air files + a tag_names.zig into an output directory. +// +// Usage: air_gen [ ]... +// output_dir: directory to write .air files and tag_names.zig +// name: repo-relative path (used as file name, e.g. "lib/foo.zig" -> "lib/foo.zig.air") +// resolved_path: filesystem path to compile + +const std = @import("std"); +pub const std_options: std.Options = .{ .log_level = .warn }; +const verbose_air = @import("verbose_air"); +const zig_internals = @import("zig_internals"); +const Air = zig_internals.Air; + +pub fn main() !void { + const gpa = std.heap.c_allocator; + const args = try std.process.argsAlloc(gpa); + if (args.len < 2) { + std.debug.print("usage: air_gen [ ]...\n", .{}); + return error.InvalidArguments; + } + + const output_dir_path = args[1]; + const pairs = args[2..]; + if (pairs.len % 2 != 0) { + std.debug.print("error: arguments must be pairs of \n", .{}); + return error.InvalidArguments; + } + const num_entries = pairs.len / 2; + + var output_dir = try std.fs.cwd().openDir(output_dir_path, .{}); + defer output_dir.close(); + + // Derive repo_root by stripping the name suffix from the first resolved path. + // e.g. name="lib/std/crypto.zig", resolved="/home/user/zig1/lib/std/crypto.zig" + // => repo_root="/home/user/zig1" + if (num_entries == 0) return; + const first_name = pairs[0]; + const first_resolved = pairs[1]; + const repo_root = blk: { + if (first_resolved.len >= first_name.len and + std.mem.eql(u8, first_resolved[first_resolved.len - first_name.len ..], first_name)) + { + break :blk first_resolved[0 .. first_resolved.len - first_name.len]; + } + break :blk std.fs.path.dirname(first_resolved) orelse "."; + }; + + // Create a symlink workaround so that files in lib/std/ are not seen as + // belonging to both 'root' and 'std' modules. We symlink repo_root into + // a temp directory and pass all paths through the symlink. + // The temp directory must be OUTSIDE the output_dir to avoid confusing the + // Zig build system's cache (it would follow the symlink back into the repo). + const tmp_dir_path = "/tmp/zig-air-gen"; + + std.fs.makeDirAbsolute(tmp_dir_path) catch |err| switch (err) { + error.PathAlreadyExists => {}, + else => { + std.debug.print("error creating tmp directory: {s}\n", .{@errorName(err)}); + return err; + }, + }; + var tmp_dir = std.fs.openDirAbsolute(tmp_dir_path, .{}) catch |err| { + std.debug.print("error opening tmp directory: {s}\n", .{@errorName(err)}); + return err; + }; + defer tmp_dir.close(); + defer std.fs.deleteTreeAbsolute(tmp_dir_path) catch {}; + + tmp_dir.symLink(repo_root, "root", .{ .is_directory = true }) catch |err| switch (err) { + error.PathAlreadyExists => {}, + else => { + std.debug.print("error creating symlink: {s}\n", .{@errorName(err)}); + return err; + }, + }; + + for (0..num_entries) |i| { + const name = pairs[i * 2]; + const resolved = pairs[i * 2 + 1]; + _ = resolved; + + // Construct paths through the symlink to avoid the "file exists in + // modules 'root' and 'std'" error. + const src_path = try std.fmt.allocPrint(gpa, "{s}/root/{s}", .{ tmp_dir_path, name }); + defer gpa.free(src_path); + const module_root = try std.fmt.allocPrint(gpa, "{s}/root", .{tmp_dir_path}); + defer gpa.free(module_root); + + const data = processSource(gpa, src_path, module_root) catch |err| { + std.debug.print("FAIL: {s} ({s}): {s}\n", .{ name, src_path, @errorName(err) }); + return err; + }; + defer gpa.free(data); + + // Write {name}.air, creating subdirectories as needed. + const air_name = try std.fmt.allocPrint(gpa, "{s}.air", .{name}); + defer gpa.free(air_name); + + if (std.fs.path.dirname(air_name)) |dir| { + output_dir.makePath(dir) catch |err| { + std.debug.print("error creating directory '{s}': {s}\n", .{ dir, @errorName(err) }); + return err; + }; + } + + var file = output_dir.createFile(air_name, .{}) catch |err| { + std.debug.print("error creating file '{s}': {s}\n", .{ air_name, @errorName(err) }); + return err; + }; + defer file.close(); + file.writeAll(data) catch |err| { + std.debug.print("error writing file '{s}': {s}\n", .{ air_name, @errorName(err) }); + return err; + }; + } + + // Write tag_names.zig + { + var out: std.ArrayListUnmanaged(u8) = .empty; + defer out.deinit(gpa); + const writer = out.writer(gpa); + + try writer.writeAll("// Generated by verbose_air_gen. Do not edit.\n\n"); + const tag_count = @typeInfo(Air.Inst.Tag).@"enum".fields.len; + try writer.print("pub const names: [{d}][:0]const u8 = .{{\n", .{tag_count}); + inline for (@typeInfo(Air.Inst.Tag).@"enum".fields) |field| { + try writer.print(" \"{s}\",\n", .{field.name}); + } + try writer.writeAll("};\n"); + + var file = try output_dir.createFile("tag_names.zig", .{}); + defer file.close(); + try file.writeAll(out.items); + } + + // Write air_data.zig — helper that bridges @embedFile for test code. + // Because @embedFile resolves relative to the source file (not --embed-dir), + // this file must live alongside the .air files so it can find them. + { + var file = try output_dir.createFile("air_data.zig", .{}); + defer file.close(); + try file.writeAll( + \\// Generated by verbose_air_gen. Do not edit. + \\pub fn getData(comptime path: []const u8) []const u8 { + \\ return @embedFile(path ++ ".air"); + \\} + \\ + ); + } +} + +/// Compile a source file and return the binary AIR data. +/// Binary format: +/// func_count: u32 (little-endian) +/// Per function: +/// name_len: u32 +/// name: [name_len]u8 +/// inst_len: u32 +/// inst_tags: [inst_len]u8 +/// inst_datas: [inst_len * 8]u8 +/// extra_len: u32 +/// extra: [extra_len * 4]u8 +fn processSource(gpa: std.mem.Allocator, src_path: []const u8, module_root: []const u8) ![]const u8 { + var err_buf: [256]u8 = .{0} ** 256; + + const result = verbose_air.zigCompileAirImpl( + src_path, + module_root, + &err_buf, + ) catch |err| { + std.debug.print("zigCompileAirImpl error for {s}: {s} ({s})\n", .{ + src_path, + std.mem.sliceTo(&err_buf, 0), + @errorName(err), + }); + return err; + }; + + if (err_buf[0] != 0) { + std.debug.print("zigCompileAirImpl error for {s}: {s}\n", .{ + src_path, + std.mem.sliceTo(&err_buf, 0), + }); + return error.CompileError; + } + + const funcs = if (result.items) |items| items[0..result.len] else &[_]verbose_air.CSemaFuncAir{}; + defer { + var r = result; + verbose_air.zig_compile_air_free(&r); + } + + // Serialize to binary format. + var buf: std.ArrayListUnmanaged(u8) = .empty; + + // func_count + try buf.writer(gpa).writeInt(u32, @intCast(funcs.len), .little); + + for (funcs) |*f| { + const w = buf.writer(gpa); + // name + const name = if (f.name) |n| std.mem.span(n) else ""; + try w.writeInt(u32, @intCast(name.len), .little); + try w.writeAll(name); + + // inst_tags + inst_datas + const inst_len = f.air.inst_len; + try w.writeInt(u32, inst_len, .little); + if (inst_len > 0) { + if (f.air.inst_tags) |tags| { + try w.writeAll(tags[0..inst_len]); + } + if (f.air.inst_datas) |datas| { + try w.writeAll(datas[0 .. inst_len * 8]); + } + } + + // extra + const extra_len = f.air.extra_len; + try w.writeInt(u32, extra_len, .little); + if (extra_len > 0) { + if (f.air.extra) |extra| { + const bytes = std.mem.sliceAsBytes(extra[0..extra_len]); + try w.writeAll(bytes); + } + } + } + + return try buf.toOwnedSlice(gpa); +} diff --git a/stage0/corpus.zig b/stage0/corpus.zig new file mode 100644 index 0000000000..d245e243d5 --- /dev/null +++ b/stage0/corpus.zig @@ -0,0 +1,296 @@ +/// Corpus files for stages testing, sorted by size. +/// Paths are repo-relative (no "../" prefix). +/// `num_passing` controls how many files are tested and pre-generated. +/// Both build.zig and stages_test.zig import this file. +/// To enable more tests: just increment `num_passing`. +pub const num_passing: usize = 66; + +pub const files = [_][]const u8{ + "lib/std/crypto/codecs.zig", // 165 + "lib/std/os/uefi/tables/table_header.zig", // 214 + "lib/std/zig/llvm.zig", // 247 + "lib/compiler_rt/neghf2.zig", // 265 + "lib/compiler_rt/negxf2.zig", // 265 + "lib/compiler_rt/absvdi2.zig", // 311 + "lib/compiler_rt/absvsi2.zig", // 311 + "lib/compiler_rt/absvti2.zig", // 314 + "lib/compiler_rt/addhf3.zig", // 319 + "lib/compiler_rt/addxf3.zig", // 323 + "lib/compiler_rt/mulhf3.zig", // 323 + "lib/compiler_rt/mulxf3.zig", // 323 + "lib/compiler_rt/truncxfdf2.zig", // 333 + "lib/compiler_rt/truncxfsf2.zig", // 333 + "lib/std/crypto/pcurves/p256/field.zig", // 338 + "lib/compiler_rt/fixhfdi.zig", // 341 + "lib/compiler_rt/fixhfsi.zig", // 341 + "lib/compiler_rt/fixxfdi.zig", // 341 + "lib/compiler_rt/fixxfsi.zig", // 341 + "lib/compiler_rt/unordhf2.zig", // 341 + "lib/compiler_rt/unordxf2.zig", // 341 + "lib/std/crypto/pcurves/secp256k1/field.zig", // 343 + "lib/compiler_rt/divhf3.zig", // 344 + "lib/compiler_rt/floatdihf.zig", // 347 + "lib/compiler_rt/floatdixf.zig", // 347 + "lib/compiler_rt/floatsihf.zig", // 347 + "lib/compiler_rt/floatsixf.zig", // 347 + "lib/compiler_rt/fixunshfdi.zig", // 350 + "lib/compiler_rt/fixunshfsi.zig", // 350 + "lib/compiler_rt/fixunsxfdi.zig", // 350 + "lib/compiler_rt/fixunsxfsi.zig", // 350 + "lib/compiler_rt/floatundihf.zig", // 353 + "lib/compiler_rt/floatundixf.zig", // 353 + "lib/compiler_rt/floatunsixf.zig", // 353 + "lib/compiler_rt/truncxfhf2.zig", // 356 + "lib/compiler_rt/floatunsihf.zig", // 357 + "lib/compiler_rt/trunctfhf2.zig", // 359 + "lib/compiler_rt/extendsfxf2.zig", // 360 + "lib/compiler/aro/backend.zig", // 362 + "lib/compiler_rt/extenddfxf2.zig", // 364 + "lib/std/compress.zig", // 372 + "lib/compiler_rt/extendhfdf2.zig", // 373 + "lib/compiler_rt/extendhfxf2.zig", // 373 + "lib/compiler_rt/extendhftf2.zig", // 376 + "lib/std/crypto/pcurves/p384/field.zig", // 376 + "lib/compiler_rt/subxf3.zig", // 399 + "lib/compiler_rt/subhf3.zig", // 406 + "lib/compiler_rt/negtf2.zig", // 409 + "lib/std/os/linux/bpf/btf_ext.zig", // 419 + "lib/compiler_rt/muldc3.zig", // 425 + "lib/compiler_rt/mulhc3.zig", // 425 + "lib/compiler_rt/mulsc3.zig", // 425 + "lib/compiler_rt/mulxc3.zig", // 425 + "lib/compiler_rt/divdc3.zig", // 434 + "lib/compiler_rt/divhc3.zig", // 434 + "lib/compiler_rt/divsc3.zig", // 434 + "lib/compiler_rt/divxc3.zig", // 434 + "lib/std/math/complex/abs.zig", // 452 + "lib/c/common.zig", // 457 + "lib/std/math/complex/arg.zig", // 458 + "lib/std/math/complex/conj.zig", // 484 + "lib/std/math/scalbn.zig", // 503 + "lib/compiler_rt/negdf2.zig", // 530 + "lib/compiler_rt/negsf2.zig", // 530 + "lib/std/Random/SplitMix64.zig", // 530 + "lib/std/os/uefi/protocol/shell_parameters.zig", // 544 + // --- files below this line are not yet passing --- + "lib/compiler_rt/gexf2.zig", // 531 + "lib/c/strings.zig", // 549 + "lib/compiler_rt/fixdfei.zig", // 564 + "lib/compiler_rt/fixhfei.zig", // 564 + "lib/compiler_rt/fixsfei.zig", // 564 + "lib/compiler_rt/fixxfei.zig", // 564 + "lib/compiler_rt/fixtfei.zig", // 565 + "lib/compiler_rt/floateidf.zig", // 569 + "lib/compiler_rt/floateihf.zig", // 569 + "lib/compiler_rt/floateisf.zig", // 569 + "lib/compiler_rt/floateixf.zig", // 569 + "lib/c/inttypes.zig", // 570 + "lib/compiler_rt/floateitf.zig", // 571 + "lib/compiler_rt/fixunsdfei.zig", // 575 + "lib/compiler_rt/fixunshfei.zig", // 575 + "lib/compiler_rt/fixunssfei.zig", // 575 + "lib/compiler_rt/fixunsxfei.zig", // 575 + "lib/compiler_rt/fixunstfei.zig", // 576 + "lib/compiler_rt/floatuneidf.zig", // 577 + "lib/compiler_rt/floatuneihf.zig", // 577 + "lib/compiler_rt/floatuneisf.zig", // 577 + "lib/compiler_rt/floatuneixf.zig", // 577 + "lib/std/math/complex/cos.zig", // 577 + "lib/compiler_rt/floatuneitf.zig", // 579 + "lib/compiler_rt/multc3.zig", // 581 + "lib/compiler_rt/divtc3.zig", // 590 + "lib/compiler_rt/adddf3.zig", // 594 + "lib/compiler_rt/addsf3.zig", // 594 + "lib/compiler_rt/muldf3.zig", // 598 + "lib/compiler_rt/mulsf3.zig", // 598 + "lib/compiler_rt/truncdfsf2.zig", // 600 + "lib/std/math/complex/acos.zig", // 608 + "lib/std/math/complex/pow.zig", // 608 + "lib/compiler_rt/fixdfsi.zig", // 616 + "lib/compiler_rt/fixsfsi.zig", // 616 + "lib/compiler_rt/truncdfhf2.zig", // 616 + "lib/compiler_rt/floatsidf.zig", // 619 + "lib/compiler_rt/floatsisf.zig", // 619 + "lib/std/math/complex/log.zig", // 620 + "lib/std/math/complex/sin.zig", // 620 + "lib/std/math/complex/tan.zig", // 626 + "lib/compiler_rt/fixunsdfsi.zig", // 628 + "lib/compiler_rt/fixunssfsi.zig", // 628 + "lib/compiler_rt/floatunsidf.zig", // 628 + "lib/compiler_rt/floatunsisf.zig", // 628 + "lib/std/math/complex/proj.zig", // 628 + "lib/compiler_rt/unorddf2.zig", // 634 + "lib/compiler_rt/unordsf2.zig", // 634 + "lib/std/math/complex/asinh.zig", // 641 + "lib/std/dwarf/EH.zig", // 643 + "lib/compiler_rt/extendsfdf2.zig", // 644 + "lib/std/math/complex/atanh.zig", // 645 + "lib/compiler_rt/unordtf2.zig", // 656 + "lib/std/Target/generic.zig", // 665 + "lib/compiler_rt/absv.zig", // 671 + "lib/std/math/complex/acosh.zig", // 678 + "lib/compiler_rt/fixdfdi.zig", // 701 + "lib/compiler_rt/fixsfdi.zig", // 701 + "lib/compiler_rt/floatdidf.zig", // 704 + "lib/compiler_rt/floatdisf.zig", // 704 + "lib/compiler_rt/floattidf.zig", // 712 + "lib/compiler_rt/floattihf.zig", // 712 + "lib/compiler_rt/floattisf.zig", // 712 + "lib/compiler_rt/floattixf.zig", // 712 + "lib/compiler_rt/fixdfti.zig", // 713 + "lib/compiler_rt/fixhfti.zig", // 713 + "lib/compiler_rt/fixsfti.zig", // 713 + "lib/compiler_rt/fixunsdfdi.zig", // 713 + "lib/compiler_rt/fixunssfdi.zig", // 713 + "lib/compiler_rt/fixxfti.zig", // 713 + "lib/compiler_rt/floatundidf.zig", // 713 + "lib/compiler_rt/floatundisf.zig", // 713 + "lib/compiler_rt/floatuntidf.zig", // 724 + "lib/compiler_rt/floatuntihf.zig", // 724 + "lib/compiler_rt/floatuntisf.zig", // 724 + "lib/compiler_rt/floatuntixf.zig", // 724 + "lib/compiler_rt/addtf3.zig", // 725 + "lib/compiler_rt/fixunsdfti.zig", // 731 + "lib/compiler_rt/fixunshfti.zig", // 731 + "lib/compiler_rt/fixunssfti.zig", // 731 + "lib/compiler_rt/fixunsxfti.zig", // 731 + "lib/compiler_rt/trunctfdf2.zig", // 731 + "lib/compiler_rt/trunctfsf2.zig", // 731 + "lib/compiler_rt/subdf3.zig", // 735 + "lib/compiler_rt/subsf3.zig", // 735 + "lib/compiler_rt/fixtfdi.zig", // 736 + "lib/compiler_rt/fixtfsi.zig", // 736 + "lib/compiler_rt/multf3.zig", // 737 + "lib/std/math/big.zig", // 746 + "lib/compiler_rt/floatditf.zig", // 748 + "lib/compiler_rt/floatsitf.zig", // 748 + "lib/std/math/complex/asin.zig", // 750 + "lib/compiler_rt/fixunstfdi.zig", // 754 + "lib/compiler_rt/fixunstfsi.zig", // 754 + "lib/init/src/root.zig", // 755 + "lib/compiler_rt/floatunditf.zig", // 761 + "lib/compiler_rt/floatunsitf.zig", // 761 + "lib/compiler_rt/udivti3.zig", // 770 + "lib/compiler_rt/extenddftf2.zig", // 781 + "lib/compiler_rt/extendsftf2.zig", // 781 + "lib/std/Build/Step/Fail.zig", // 831 + "lib/std/crypto/test.zig", // 835 + "lib/compiler_rt/bswapsi2_test.zig", // 840 + "lib/compiler_rt/umodti3.zig", // 846 + "lib/std/os/windows/crypt32.zig", // 850 + "lib/compiler_rt/subvsi3.zig", // 860 + "lib/compiler_rt/fixtfti.zig", // 867 + "lib/compiler_rt/floattitf.zig", // 872 + "lib/compiler_rt/addvsi3.zig", // 874 + "lib/compiler_rt/bcmp.zig", // 874 + "lib/compiler_rt/memset.zig", // 876 + "lib/compiler_rt/truncsfhf2.zig", // 881 + "lib/compiler_rt/subtf3.zig", // 884 + "lib/compiler_rt/divti3_test.zig", // 886 + "lib/compiler_rt/udivmodti4.zig", // 886 + "lib/compiler_rt/floatuntitf.zig", // 888 + "lib/compiler_rt/fixunstfti.zig", // 891 + "lib/std/compress/lzma2.zig", // 894 + "lib/compiler_rt/mulvsi3.zig", // 902 + "lib/compiler_rt/bitreversesi2_test.zig", // 910 + "lib/compiler_rt/extendhfsf2.zig", // 920 + "lib/compiler_rt/memcmp.zig", // 931 + "lib/compiler_rt/subvdi3.zig", // 932 + "lib/init/src/main.zig", // 936 + "lib/compiler_rt/gehf2.zig", // 960 + "lib/compiler_rt/divsf3_test.zig", // 982 + "lib/compiler_rt/paritysi2_test.zig", // 989 + "lib/std/math/expo2.zig", // 995 +}; + +pub const sema_unit_tests = [_][]const u8{ + "stage0/sema_tests/empty.zig", + "stage0/sema_tests/const_decl.zig", + "stage0/sema_tests/empty_void_function.zig", + "stage0/sema_tests/return_integer.zig", + "stage0/sema_tests/identity_function.zig", + "stage0/sema_tests/add_two_args.zig", + "stage0/sema_tests/add_comptime_int.zig", + "stage0/sema_tests/sub_two_args.zig", + "stage0/sema_tests/xor_two_args.zig", + "stage0/sema_tests/xor_comptime_int.zig", + "stage0/sema_tests/bitcast_u32_to_f32.zig", + "stage0/sema_tests/bitcast_f32_to_u32.zig", + "stage0/sema_tests/as_node.zig", + "stage0/sema_tests/local_const_binding.zig", + "stage0/sema_tests/multiple_operations.zig", + "stage0/sema_tests/neghf2_inline_equivalent.zig", + "stage0/sema_tests/mul_two_args.zig", + "stage0/sema_tests/compare_lt.zig", + "stage0/sema_tests/compare_eq.zig", + "stage0/sema_tests/bit_shift_right.zig", + "stage0/sema_tests/mul_comptime_int.zig", + "stage0/sema_tests/chain_of_casts.zig", + "stage0/sema_tests/mixed_arithmetic_and_bitwise.zig", + "stage0/sema_tests/shift_and_mask.zig", + "stage0/sema_tests/f32_arithmetic.zig", + "stage0/sema_tests/multi_param_function.zig", + "stage0/sema_tests/nested_bitcast_xor.zig", + "stage0/sema_tests/pointer_param_identity.zig", + "stage0/sema_tests/store_to_pointer.zig", + "stage0/sema_tests/sub_comptime.zig", + "stage0/sema_tests/store_runtime_value.zig", + "stage0/sema_tests/load_from_pointer.zig", + "stage0/sema_tests/negate.zig", + "stage0/sema_tests/bit_not.zig", + "stage0/sema_tests/bit_shift_left.zig", + "stage0/sema_tests/intcast.zig", + "stage0/sema_tests/truncate.zig", + "stage0/sema_tests/two_local_bindings.zig", + "stage0/sema_tests/wrapping_add.zig", + "stage0/sema_tests/wrapping_sub.zig", + "stage0/sema_tests/wrapping_mul.zig", + "stage0/sema_tests/bool_not.zig", + "stage0/sema_tests/if_simple.zig", + "stage0/sema_tests/wrapping_negate.zig", + "stage0/sema_tests/clz.zig", + "stage0/sema_tests/ctz.zig", + "stage0/sema_tests/popcount.zig", + "stage0/sema_tests/byteswap.zig", + "stage0/sema_tests/float_cast_widen.zig", + "stage0/sema_tests/float_cast_narrow.zig", + "stage0/sema_tests/int_from_float.zig", + "stage0/sema_tests/float_from_int.zig", + "stage0/sema_tests/bitmask_shift_and.zig", + "stage0/sema_tests/double_negate.zig", + "stage0/sema_tests/return_ptr_type.zig", + "stage0/sema_tests/float_cast_f16_to_f32.zig", + "stage0/sema_tests/wrapping_add_comptime.zig", + "stage0/sema_tests/byteswap_and_xor.zig", + "stage0/sema_tests/same_file_inline_function_call.zig", + "stage0/sema_tests/same_file_inline_call_with_bitcast_and_xor.zig", + "stage0/sema_tests/same_file_inline_call_with_two_args.zig", + "stage0/sema_tests/intfrombool.zig", + "stage0/sema_tests/add_sat.zig", + "stage0/sema_tests/sub_sat.zig", + "stage0/sema_tests/mul_sat.zig", + "stage0/sema_tests/shl_sat.zig", + "stage0/sema_tests/bit_or.zig", + "stage0/sema_tests/bit_and.zig", + "stage0/sema_tests/f16_add.zig", + "stage0/sema_tests/f64_mul.zig", + "stage0/sema_tests/intcast_computed_dest_type.zig", + "stage0/sema_tests/multiple_return_paths.zig", + "stage0/sema_tests/if_with_early_return.zig", + "stage0/sema_tests/var_bitcast_and_if.zig", + "stage0/sema_tests/var_assignment_in_if.zig", + "stage0/sema_tests/nested_if.zig", + "stage0/sema_tests/wrapping_sub_in_expr.zig", + "stage0/sema_tests/if_else_block_result.zig", + "stage0/sema_tests/call_inside_runtime_conditional.zig", + "stage0/sema_tests/inline_fn_with_call_inside_conditional.zig", + "stage0/sema_tests/plus_eq_with_call_inside_conditional.zig", + "stage0/sema_tests/inline_fn_with_plus_eq_call_inside_conditional.zig", + "stage0/sema_tests/inline_fn_with_generic_call_inside_conditional.zig", + "stage0/sema_tests/inline_fn_with_two_generic_calls_in_conditionals.zig", + "stage0/sema_tests/inline_fn_with_plus_eq_call_inside_two_conditionals.zig", + "stage0/sema_tests/abs_float.zig", + "stage0/sema_tests/max_float.zig", + "stage0/sema_tests/min_float.zig", + "stage0/sema_tests/f64_div.zig", +}; diff --git a/stage0/sema.c b/stage0/sema.c index 258330770a..fb8ed4138e 100644 --- a/stage0/sema.c +++ b/stage0/sema.c @@ -5484,8 +5484,8 @@ static AirInstRef semaResolveSwitchComptime( const uint32_t* body = &sema->code.extra[body_start]; // Reserve BLOCK instruction (matches Zig line 11927-11931). - // Data is undefined in upstream; use 0 so the dead-block - // skip logic in the test comparison can handle it. + // Data is undefined in upstream; zero it so the dead-block + // skip rule in the test comparator fires correctly. AirInstData block_data; memset(&block_data, 0, sizeof(block_data)); uint32_t block_inst diff --git a/stage0/sema_test.zig b/stage0/sema_test.zig index 8bd0e13b7e..6cca7a1b27 100644 --- a/stage0/sema_test.zig +++ b/stage0/sema_test.zig @@ -221,69 +221,128 @@ test "sema: function decl smoke test" { } // --------------------------------------------------------------------------- -// Air raw comparison: C vs Zig +// Air raw comparison: C vs pre-computed Zig AIR // --------------------------------------------------------------------------- -const ZigCompileAirResult = extern struct { - items: ?[*]c.SemaFuncAir, - len: u32, - callback_count: u32, -}; -extern fn zig_compile_air([*:0]const u8, ?[*:0]const u8, [*]u8) ZigCompileAirResult; -extern fn zig_compile_air_free(*ZigCompileAirResult) void; +const air_tag_names = @import("air_tag_names"); -pub fn airCompareFromSource(source: [:0]const u8, c_func_air_list: c.SemaFuncAirList) !void { - var tmp = std.testing.tmpDir(.{}); - defer tmp.cleanup(); - const f = tmp.dir.createFile("t.zig", .{}) catch return error.TmpFileCreate; - f.writeAll(source) catch { - f.close(); - return error.TmpFileWrite; - }; - f.close(); - var path_buf: [std.fs.max_path_bytes:0]u8 = undefined; - const tmp_path = tmp.dir.realpathZ("t.zig", &path_buf) catch return error.TmpFileCreate; - path_buf[tmp_path.len] = 0; - return airCompare(@ptrCast(tmp_path.ptr), null, c_func_air_list); +/// A parsed function from the pre-computed AIR binary data. +pub const PrecomputedFunc = struct { + name: []const u8, + air: c.Air, +}; + +/// Parse pre-computed AIR from binary data (generated by air_gen). +/// Binary format: +/// func_count: u32 (little-endian) +/// Per function: +/// name_len: u32 +/// name: [name_len]u8 +/// inst_len: u32 +/// inst_tags: [inst_len]u8 +/// inst_datas: [inst_len * 8]u8 +/// extra_len: u32 +/// extra: [extra_len * 4]u8 +pub fn parsePrecomputedAir(gpa: std.mem.Allocator, data: []const u8) ![]PrecomputedFunc { + var pos: usize = 0; + + const func_count = readU32(data, &pos) orelse return error.InvalidAirData; + const funcs = try gpa.alloc(PrecomputedFunc, func_count); + errdefer gpa.free(funcs); + + for (funcs) |*f| { + // name + const name_len = readU32(data, &pos) orelse return error.InvalidAirData; + if (pos + name_len > data.len) return error.InvalidAirData; + f.name = data[pos..][0..name_len]; + pos += name_len; + + // inst_tags + inst_datas (allocate copies with proper alignment) + const inst_len = readU32(data, &pos) orelse return error.InvalidAirData; + + const tags: [*c]u8 = if (inst_len > 0) blk: { + if (pos + inst_len > data.len) return error.InvalidAirData; + const alloc = try gpa.alloc(u8, inst_len); + @memcpy(alloc, data[pos..][0..inst_len]); + break :blk alloc.ptr; + } else null; + pos += inst_len; + + const datas: [*c]c.AirInstData = if (inst_len > 0) blk: { + const datas_byte_len = inst_len * 8; + if (pos + datas_byte_len > data.len) return error.InvalidAirData; + const alloc = try gpa.alloc(c.AirInstData, inst_len); + const alloc_bytes: [*]u8 = @ptrCast(alloc.ptr); + @memcpy(alloc_bytes[0..datas_byte_len], data[pos..][0..datas_byte_len]); + break :blk alloc.ptr; + } else null; + pos += inst_len * 8; + + // extra (allocate copy with u32 alignment) + const extra_len = readU32(data, &pos) orelse return error.InvalidAirData; + const extra: [*c]u32 = if (extra_len > 0) blk: { + const extra_byte_len = extra_len * 4; + if (pos + extra_byte_len > data.len) return error.InvalidAirData; + const alloc = try gpa.alloc(u32, extra_len); + const alloc_bytes: [*]u8 = @ptrCast(alloc.ptr); + @memcpy(alloc_bytes[0..extra_byte_len], data[pos..][0..extra_byte_len]); + break :blk alloc.ptr; + } else null; + pos += extra_len * 4; + + f.air = .{ + .inst_len = inst_len, + .inst_cap = inst_len, + .inst_tags = tags, + .inst_datas = datas, + .extra_len = extra_len, + .extra_cap = extra_len, + .extra = extra, + }; + } + + return funcs; } -pub fn airCompare( - src_path: [*:0]const u8, - module_root: ?[*:0]const u8, - c_func_air_list: c.SemaFuncAirList, -) !void { - var err_buf: [c.ZIG_COMPILE_ERR_BUF_SIZE]u8 = .{0} ** c.ZIG_COMPILE_ERR_BUF_SIZE; - var zig_result = zig_compile_air(src_path, module_root, &err_buf); - defer zig_compile_air_free(&zig_result); +fn readU32(data: []const u8, pos: *usize) ?u32 { + if (pos.* + 4 > data.len) return null; + const val = std.mem.readInt(u32, data[pos.*..][0..4], .little); + pos.* += 4; + return val; +} - if (err_buf[0] != 0) { - std.debug.print("zig_compile_air error: {s}\n", .{std.mem.sliceTo(&err_buf, 0)}); - return error.ZigCompileError; +pub fn freePrecomputedAir(gpa: std.mem.Allocator, funcs: []PrecomputedFunc) void { + for (funcs) |f| { + if (f.air.inst_tags) |t| gpa.free(t[0..f.air.inst_len]); + if (f.air.inst_datas) |d| gpa.free(d[0..f.air.inst_len]); + if (f.air.extra) |e| gpa.free(e[0..f.air.extra_len]); } + gpa.free(funcs); +} - // Canary: if C sema found functions, the Zig callback must have fired. - if (c_func_air_list.len > 0 and zig_result.callback_count == 0) { - std.debug.print("Canary: C sema produced {d} functions but Zig callback never fired\n", .{c_func_air_list.len}); - return error.AirCallbackNotFired; - } - - const zig_funcs = if (zig_result.items) |items| items[0..zig_result.len] else &[_]c.SemaFuncAir{}; +/// Compare C sema output against pre-computed AIR data. +pub fn airComparePrecomputed(precomputed: []const PrecomputedFunc, c_func_air_list: c.SemaFuncAirList) !void { const c_funcs_ptr: ?[*]const c.SemaFuncAir = @ptrCast(c_func_air_list.items); const c_funcs = if (c_funcs_ptr) |items| items[0..c_func_air_list.len] else &[_]c.SemaFuncAir{}; - // Compare functions that exist in both C and Zig output. - // The C sema may produce fewer functions (e.g. missing import - // resolution), so we iterate C functions and look them up in Zig. for (c_funcs) |*cf| { const c_name = if (cf.name) |n| std.mem.span(n) else ""; - const zf = airFindByName(zig_funcs, c_name) orelse { - std.debug.print("C function '{s}' not found in Zig output\n", .{c_name}); + const pf = precomputedFindByName(precomputed, c_name) orelse { + std.debug.print("C function '{s}' not found in pre-computed AIR\n", .{c_name}); return error.AirMismatch; }; - try airCompareOne(c_name, &zf.air, &cf.air); + try airCompareOne(c_name, &pf.air, &cf.air); } } +fn precomputedFindByName(funcs: []const PrecomputedFunc, name: []const u8) ?*const PrecomputedFunc { + const bare_name = stripModulePrefix(name); + for (funcs) |*f| { + if (std.mem.eql(u8, bare_name, stripModulePrefix(f.name))) return f; + } + return null; +} + fn cNameSpan(name: [*c]u8) []const u8 { const opt: ?[*:0]const u8 = @ptrCast(name); return if (opt) |n| std.mem.span(n) else ""; @@ -298,23 +357,13 @@ fn stripModulePrefix(fqn: []const u8) []const u8 { fqn; } -fn airFindByName(funcs: []const c.SemaFuncAir, name: []const u8) ?*const c.SemaFuncAir { - const bare_name = stripModulePrefix(name); - for (funcs) |*f| { - const c_name = cNameSpan(f.name); - if (std.mem.eql(u8, bare_name, stripModulePrefix(c_name))) return f; - } - return null; -} - fn cToOpt(comptime T: type, ptr: [*c]T) ?[*]const T { return if (ptr == null) null else @ptrCast(ptr); } fn airTagNameSlice(tag_val: u8) []const u8 { - return std.mem.span(air_tag_name(tag_val)); + return air_tag_names.names[tag_val]; } -extern fn air_tag_name(tag: u8) [*:0]const u8; fn refKindStr(ref: u32) []const u8 { if (ref == 0xFFFFFFFF) return "none"; @@ -791,586 +840,22 @@ fn airCompareOne(name: []const u8, zig_air: *const c.Air, c_air: *const c.Air) ! } } -fn semaAirRawCheck(source: [:0]const u8) !void { - // C pipeline: parse -> astgen -> sema - var result = try semaCheck(source); - defer result.deinit(); - - // Zig pipeline: compile source and compare Air arrays - try airCompareFromSource(source, result.c_func_air_list); -} - -test "sema: Air raw C vs Zig comparison (empty)" { - try semaAirRawCheck(""); -} - -test "sema: Air raw C vs Zig comparison (const)" { - try semaAirRawCheck("const x = 0;"); -} - -test "sema air: empty void function" { - try semaAirRawCheck("export fn f() void {}"); -} - -test "sema air: return integer" { - try semaAirRawCheck("export fn f() u32 { return 42; }"); -} - -test "sema air: identity function" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x; }"); -} - -test "sema air: add two args" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x + y; }"); -} - -test "sema air: add comptime int" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x + 1; }"); -} - -test "sema air: sub two args" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x - y; }"); -} - -test "sema air: xor two args" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x ^ y; }"); -} - -test "sema air: xor comptime int" { - try semaAirRawCheck("export fn f(x: u16) u16 { return x ^ 0x8000; }"); -} - -test "sema air: bitcast u32 to f32" { - try semaAirRawCheck("export fn f(x: u32) f32 { return @bitCast(x); }"); -} - -test "sema air: bitcast f32 to u32" { - try semaAirRawCheck("export fn f(x: f32) u32 { return @bitCast(x); }"); -} - -test "sema air: as node" { - try semaAirRawCheck("export fn f(x: u32) u32 { return @as(u32, x); }"); -} - -test "sema air: local const binding" { - try semaAirRawCheck("export fn f(x: u32) u32 { const y = x + 1; return y; }"); -} - -test "sema air: multiple operations" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return (x + y) ^ 0xFF; }"); -} - -test "sema air: neghf2 inline equivalent" { - try semaAirRawCheck( - \\export fn f(a: f16) f16 { - \\ return @bitCast(@as(u16, @bitCast(a)) ^ @as(u16, 0x8000)); - \\} - ); -} - -test "sema air: mul two args" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x * y; }"); -} - -// TODO: bool and/or require block merges and conditional analysis (bool_br_and). -// test "sema air: bool and" { -// try semaAirRawCheck("export fn f(x: bool, y: bool) bool { return x and y; }"); -// } - -test "sema air: compare lt" { - try semaAirRawCheck("export fn f(x: u32, y: u32) bool { return x < y; }"); -} - -test "sema air: compare eq" { - try semaAirRawCheck("export fn f(x: u32, y: u32) bool { return x == y; }"); -} - -test "sema air: bit shift right" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x >> 1; }"); -} - -test "sema air: mul comptime int" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x * 3; }"); -} - -test "sema air: chain of casts" { - try semaAirRawCheck( - \\export fn f(x: u8) u32 { - \\ const wide: u16 = @intCast(x); - \\ return @intCast(wide); - \\} - ); -} - -test "sema air: mixed arithmetic and bitwise" { - try semaAirRawCheck( - \\export fn f(a: u32, b: u32) u32 { - \\ return (a + b) & 0xFF; - \\} - ); -} - -test "sema air: shift and mask" { - try semaAirRawCheck( - \\export fn f(x: u32) u32 { - \\ return (x >> 8) & 0xFF; - \\} - ); -} - -test "sema air: f32 arithmetic" { - try semaAirRawCheck("export fn f(x: f32, y: f32) f32 { return x + y; }"); -} - -test "sema air: multi-param function" { - try semaAirRawCheck( - \\export fn f(a: u32, b: u32, c: u32) u32 { - \\ return (a + b) * c; - \\} - ); -} - -test "sema air: nested bitcast xor" { - try semaAirRawCheck( - \\export fn f(a: f32) f32 { - \\ return @bitCast(@as(u32, @bitCast(a)) ^ @as(u32, 0x80000000)); - \\} - ); -} - -test "sema air: pointer param identity" { - try semaAirRawCheck("export fn f(x: *u32) *u32 { return x; }"); -} - -test "sema air: store to pointer" { - try semaAirRawCheck( - \\export fn f(x: *u32) void { - \\ x.* = 42; - \\} - ); -} - -test "sema air: sub comptime" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x - 1; }"); -} - -test "sema air: store runtime value" { - try semaAirRawCheck( - \\export fn f(p: *u32, x: u32) void { - \\ p.* = x; - \\} - ); -} - -test "sema air: load from pointer" { - try semaAirRawCheck( - \\export fn f(p: *u32) u32 { - \\ return p.*; - \\} - ); -} - -test "sema air: negate" { - try semaAirRawCheck("export fn f(x: i32) i32 { return -x; }"); -} - -test "sema air: bit not" { - try semaAirRawCheck("export fn f(x: u32) u32 { return ~x; }"); -} - -test "sema air: bit shift left" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x << 1; }"); -} - -test "sema air: intcast" { - try semaAirRawCheck("export fn f(x: u16) u32 { return @intCast(x); }"); -} - -test "sema air: truncate" { - try semaAirRawCheck("export fn f(x: u32) u16 { return @truncate(x); }"); -} - -test "sema air: two local bindings" { - try semaAirRawCheck( - \\export fn f(x: u32, y: u32) u32 { - \\ const a = x + 1; - \\ const b = y + 2; - \\ return a ^ b; - \\} - ); -} - -test "sema air: wrapping add" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x +% y; }"); -} - -test "sema air: wrapping sub" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x -% y; }"); -} - -test "sema air: wrapping mul" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x *% y; }"); -} - -// test "sema air: div" { -// // Requires zirDiv with safety checks (div_trunc + remainder check). -// try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x / y; }"); -// } - -test "sema air: bool not" { - try semaAirRawCheck("export fn f(x: bool) bool { return !x; }"); -} - -test "sema air: if simple" { - // Requires condbr, block merging, conditional branching. - try semaAirRawCheck( - \\export fn f(x: u32, y: u32) u32 { - \\ if (x > y) return x; - \\ return y; - \\} - ); -} - -test "sema air: wrapping negate" { - try semaAirRawCheck("export fn f(x: i32) i32 { return -%x; }"); -} - -test "sema air: clz" { - try semaAirRawCheck("export fn f(x: u32) u32 { return @clz(x); }"); -} - -test "sema air: ctz" { - try semaAirRawCheck("export fn f(x: u32) u32 { return @ctz(x); }"); -} - -test "sema air: popcount" { - try semaAirRawCheck("export fn f(x: u32) u32 { return @popCount(x); }"); -} - -test "sema air: byteswap" { - try semaAirRawCheck("export fn f(x: u32) u32 { return @byteSwap(x); }"); -} - -test "sema air: float cast widen" { - try semaAirRawCheck("export fn f(x: f32) f64 { return @floatCast(x); }"); -} - -test "sema air: float cast narrow" { - try semaAirRawCheck("export fn f(x: f64) f32 { return @floatCast(x); }"); -} - -test "sema air: int from float" { - try semaAirRawCheck("export fn f(x: f32) u32 { return @intFromFloat(x); }"); -} - -test "sema air: float from int" { - try semaAirRawCheck("export fn f(x: u32) f32 { return @floatFromInt(x); }"); -} - -test "sema air: bitmask shift and" { - try semaAirRawCheck("export fn f(x: u32) u32 { return (x >> 16) & 0xFF; }"); -} - -test "sema air: double negate" { - try semaAirRawCheck("export fn f(x: i32) i32 { return -(-x); }"); -} - -test "sema air: return ptr type" { - try semaAirRawCheck("export fn f(p: *u32) *u32 { return p; }"); -} - -test "sema air: float cast f16 to f32" { - try semaAirRawCheck("export fn f(x: f16) f32 { return @floatCast(x); }"); -} - -test "sema air: wrapping add comptime" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x +% 1; }"); -} - -test "sema air: byteswap and xor" { - try semaAirRawCheck( - \\export fn f(x: u32) u32 { - \\ return @byteSwap(x) ^ 0xFF; - \\} - ); -} - -test "sema air: same-file inline function call" { - try semaAirRawCheck( - \\inline fn negate(x: u16) u16 { - \\ return ~x; - \\} - \\export fn f(a: u16) u16 { - \\ return negate(a); - \\} - ); -} - -test "sema air: same-file inline call with bitcast and xor" { - try semaAirRawCheck( - \\inline fn flip_sign(x: u16) u16 { - \\ return x ^ 0x8000; - \\} - \\export fn f(a: u16) u16 { - \\ return flip_sign(a); - \\} - ); -} - -test "sema air: same-file inline call with two args" { - try semaAirRawCheck( - \\inline fn my_add(x: u32, y: u32) u32 { - \\ return x + y; - \\} - \\export fn f(a: u32, b: u32) u32 { - \\ return my_add(a, b); - \\} - ); -} - -test "sema air: intFromBool" { - try semaAirRawCheck("export fn f(x: bool) u32 { return @intFromBool(x); }"); -} - -test "sema air: add_sat" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x +| y; }"); -} - -test "sema air: sub_sat" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x -| y; }"); -} - -test "sema air: mul_sat" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x *| y; }"); -} - -test "sema air: shl_sat" { - try semaAirRawCheck("export fn f(x: u32) u32 { return x <<| 1; }"); -} - -test "sema air: bit_or" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x | y; }"); -} - -test "sema air: bit_and" { - try semaAirRawCheck("export fn f(x: u32, y: u32) u32 { return x & y; }"); -} - -test "sema air: f16 add" { - try semaAirRawCheck("export fn f(x: f16, y: f16) f16 { return x + y; }"); -} - -test "sema air: f64 mul" { - try semaAirRawCheck("export fn f(x: f64, y: f64) f64 { return x * y; }"); -} - -test "sema air: intcast computed dest type" { - try semaAirRawCheck( - \\export fn f(x: u16) u32 { - \\ return @intCast(x); - \\} - ); -} - -test "sema air: multiple return paths" { - try semaAirRawCheck( - \\export fn f(x: u32) u32 { - \\ return x + 1; - \\} - \\export fn g(x: u32) u32 { - \\ return x * 2; - \\} - ); -} - -test "sema air: if with early return" { - try semaAirRawCheck( - \\export fn f(x: u32, y: u32) u32 { - \\ if (x > y) return x; - \\ return y; - \\} - ); -} - -test "sema air: var bitcast and if" { - try semaAirRawCheck( - \\export fn f(a: f16) u16 { - \\ var x: u16 = @bitCast(a); - \\ if (x > 100) { - \\ x = x - 1; - \\ } - \\ return x; - \\} - ); -} - -test "sema air: var assignment in if" { - try semaAirRawCheck( - \\export fn f(a: u32, b: u32) u32 { - \\ var x = a; - \\ if (b > a) { - \\ x = b; - \\ } - \\ return x; - \\} - ); -} - -test "sema air: nested if" { - try semaAirRawCheck( - \\export fn f(a: u32, b: u32) u32 { - \\ if (a > 0) { - \\ if (b > 0) return a + b; - \\ return a; - \\ } - \\ return b; - \\} - ); -} - -test "sema air: wrapping sub in expr" { - try semaAirRawCheck( - \\export fn f(a: u32) u32 { - \\ return a -% 1; - \\} - ); -} - -test "sema air: if-else block result" { - try semaAirRawCheck( - \\export fn f(a: u32, b: u32) u32 { - \\ const x = if (a > b) a else b; - \\ return x; - \\} - ); -} - -test "sema air: call inside runtime conditional" { - try semaAirRawCheck( - \\fn bar(p: *u32) void { - \\ p.* += 1; - \\} - \\export fn f(a: u32) u32 { - \\ var x: u32 = a; - \\ if (a < 10) bar(&x); - \\ return x; - \\} - ); -} - -test "sema air: inline fn with call inside conditional" { - try semaAirRawCheck( - \\fn bar(p: *u32) void { - \\ p.* += 1; - \\} - \\inline fn baz(a: u32, x: *u32) void { - \\ if (a < 10) bar(x); - \\} - \\export fn f(a: u32) u32 { - \\ var x: u32 = a; - \\ baz(a, &x); - \\ return x; - \\} - ); -} - -test "sema air: += with call inside conditional" { - try semaAirRawCheck( - \\fn bar(p: *u32) u32 { - \\ return p.* + 1; - \\} - \\export fn f(a: u32) u32 { - \\ var x: u32 = a; - \\ if (a < 10) x += bar(&x); - \\ return x; - \\} - ); -} - -test "sema air: inline fn with += call inside conditional" { - try semaAirRawCheck( - \\fn bar(p: *u32) u32 { - \\ return p.* + 1; - \\} - \\inline fn baz(a: u32, x: *u32) void { - \\ if (a < 10) x.* += bar(x); - \\} - \\export fn f(a: u32) u32 { - \\ var x: u32 = a; - \\ baz(a, &x); - \\ return x; - \\} - ); -} - -test "sema air: inline fn with generic call inside conditional" { - try semaAirRawCheck( - \\fn normalize(comptime T: type, p: *T) i32 { - \\ p.* +%= 1; - \\ return 1; - \\} - \\inline fn mulf(comptime T: type, a: T) T { - \\ var x: T = a; - \\ var scale: i32 = 0; - \\ if (x < 10) scale += normalize(T, &x); - \\ return x +% @as(T, @intCast(@as(u32, @bitCast(scale)))); - \\} - \\export fn f(a: u32) u32 { - \\ return mulf(u32, a); - \\} - ); -} - -test "sema air: inline fn with two generic calls in conditionals" { - try semaAirRawCheck( - \\fn normalize(comptime T: type, p: *T) i32 { - \\ p.* +%= 1; - \\ return 1; - \\} - \\inline fn mulf(comptime T: type, a: T, b: T) T { - \\ var x: T = a; - \\ var y: T = b; - \\ var scale: i32 = 0; - \\ if (x < 10) scale += normalize(T, &x); - \\ if (y < 10) scale += normalize(T, &y); - \\ return x +% y +% @as(T, @intCast(@as(u32, @bitCast(scale)))); - \\} - \\export fn f(a: u32, b: u32) u32 { - \\ return mulf(u32, a, b); - \\} - ); -} - -test "sema air: inline fn with += call inside two conditionals" { - try semaAirRawCheck( - \\fn bar(p: *u32) u32 { - \\ return p.* + 1; - \\} - \\inline fn baz(a: u32, x: *u32, y: *u32) void { - \\ if (a < 10) x.* += bar(x); - \\ if (a < 20) y.* += bar(y); - \\} - \\export fn f(a: u32) u32 { - \\ var x: u32 = a; - \\ var y: u32 = a; - \\ baz(a, &x, &y); - \\ return x +% y; - \\} - ); -} - -test "sema air: @abs float" { - try semaAirRawCheck("export fn f(x: f64) f64 { return @abs(x); }"); -} - -test "sema air: @max float" { - try semaAirRawCheck("export fn f(x: f64, y: f64) f64 { return @max(x, y); }"); -} - -test "sema air: @min float" { - try semaAirRawCheck("export fn f(x: f64, y: f64) f64 { return @min(x, y); }"); -} - -test "sema air: f64 div" { - try semaAirRawCheck("export fn f(x: f64, y: f64) f64 { return x / y; }"); +const corpus = @import("corpus.zig"); + +test "sema air: unit tests" { + const gpa = std.testing.allocator; + @setEvalBranchQuota(corpus.sema_unit_tests.len * 2); + inline for (corpus.sema_unit_tests) |path| { + const source: [:0]const u8 = @embedFile("../" ++ path); + var result = try semaCheck(source); + defer result.deinit(); + + const air_data = @import("air_data").getData(path); + const precomputed = try parsePrecomputedAir(gpa, air_data); + defer freePrecomputedAir(gpa, precomputed); + airComparePrecomputed(precomputed, result.c_func_air_list) catch { + std.debug.print("FAIL: {s}\n", .{path}); + return error.TestFailed; + }; + } } diff --git a/stage0/sema_tests/abs_float.zig b/stage0/sema_tests/abs_float.zig new file mode 100644 index 0000000000..28103990d0 --- /dev/null +++ b/stage0/sema_tests/abs_float.zig @@ -0,0 +1 @@ +export fn f(x: f64) f64 { return @abs(x); } diff --git a/stage0/sema_tests/add_comptime_int.zig b/stage0/sema_tests/add_comptime_int.zig new file mode 100644 index 0000000000..ee61ba48af --- /dev/null +++ b/stage0/sema_tests/add_comptime_int.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x + 1; } diff --git a/stage0/sema_tests/add_sat.zig b/stage0/sema_tests/add_sat.zig new file mode 100644 index 0000000000..f88824a401 --- /dev/null +++ b/stage0/sema_tests/add_sat.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x +| y; } diff --git a/stage0/sema_tests/add_two_args.zig b/stage0/sema_tests/add_two_args.zig new file mode 100644 index 0000000000..c654ef4dbe --- /dev/null +++ b/stage0/sema_tests/add_two_args.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x + y; } diff --git a/stage0/sema_tests/as_node.zig b/stage0/sema_tests/as_node.zig new file mode 100644 index 0000000000..4f5053c8b5 --- /dev/null +++ b/stage0/sema_tests/as_node.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return @as(u32, x); } diff --git a/stage0/sema_tests/bit_and.zig b/stage0/sema_tests/bit_and.zig new file mode 100644 index 0000000000..b92c9c8a41 --- /dev/null +++ b/stage0/sema_tests/bit_and.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x & y; } diff --git a/stage0/sema_tests/bit_not.zig b/stage0/sema_tests/bit_not.zig new file mode 100644 index 0000000000..54c2b076ac --- /dev/null +++ b/stage0/sema_tests/bit_not.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return ~x; } diff --git a/stage0/sema_tests/bit_or.zig b/stage0/sema_tests/bit_or.zig new file mode 100644 index 0000000000..5179bef3ff --- /dev/null +++ b/stage0/sema_tests/bit_or.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x | y; } diff --git a/stage0/sema_tests/bit_shift_left.zig b/stage0/sema_tests/bit_shift_left.zig new file mode 100644 index 0000000000..74b60e30f9 --- /dev/null +++ b/stage0/sema_tests/bit_shift_left.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x << 1; } diff --git a/stage0/sema_tests/bit_shift_right.zig b/stage0/sema_tests/bit_shift_right.zig new file mode 100644 index 0000000000..41e986efc1 --- /dev/null +++ b/stage0/sema_tests/bit_shift_right.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x >> 1; } diff --git a/stage0/sema_tests/bitcast_f32_to_u32.zig b/stage0/sema_tests/bitcast_f32_to_u32.zig new file mode 100644 index 0000000000..4685d46c54 --- /dev/null +++ b/stage0/sema_tests/bitcast_f32_to_u32.zig @@ -0,0 +1 @@ +export fn f(x: f32) u32 { return @bitCast(x); } diff --git a/stage0/sema_tests/bitcast_u32_to_f32.zig b/stage0/sema_tests/bitcast_u32_to_f32.zig new file mode 100644 index 0000000000..8c22fccba4 --- /dev/null +++ b/stage0/sema_tests/bitcast_u32_to_f32.zig @@ -0,0 +1 @@ +export fn f(x: u32) f32 { return @bitCast(x); } diff --git a/stage0/sema_tests/bitmask_shift_and.zig b/stage0/sema_tests/bitmask_shift_and.zig new file mode 100644 index 0000000000..3babd2d802 --- /dev/null +++ b/stage0/sema_tests/bitmask_shift_and.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return (x >> 16) & 0xFF; } diff --git a/stage0/sema_tests/bool_not.zig b/stage0/sema_tests/bool_not.zig new file mode 100644 index 0000000000..6cf850a9d4 --- /dev/null +++ b/stage0/sema_tests/bool_not.zig @@ -0,0 +1 @@ +export fn f(x: bool) bool { return !x; } diff --git a/stage0/sema_tests/byteswap.zig b/stage0/sema_tests/byteswap.zig new file mode 100644 index 0000000000..98d63f4e77 --- /dev/null +++ b/stage0/sema_tests/byteswap.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return @byteSwap(x); } diff --git a/stage0/sema_tests/byteswap_and_xor.zig b/stage0/sema_tests/byteswap_and_xor.zig new file mode 100644 index 0000000000..e868cc2aea --- /dev/null +++ b/stage0/sema_tests/byteswap_and_xor.zig @@ -0,0 +1,3 @@ +export fn f(x: u32) u32 { + return @byteSwap(x) ^ 0xFF; +} diff --git a/stage0/sema_tests/call_inside_runtime_conditional.zig b/stage0/sema_tests/call_inside_runtime_conditional.zig new file mode 100644 index 0000000000..e9948b1a76 --- /dev/null +++ b/stage0/sema_tests/call_inside_runtime_conditional.zig @@ -0,0 +1,8 @@ +fn bar(p: *u32) void { + p.* += 1; +} +export fn f(a: u32) u32 { + var x: u32 = a; + if (a < 10) bar(&x); + return x; +} diff --git a/stage0/sema_tests/chain_of_casts.zig b/stage0/sema_tests/chain_of_casts.zig new file mode 100644 index 0000000000..215ae86daa --- /dev/null +++ b/stage0/sema_tests/chain_of_casts.zig @@ -0,0 +1,4 @@ +export fn f(x: u8) u32 { + const wide: u16 = @intCast(x); + return @intCast(wide); +} diff --git a/stage0/sema_tests/clz.zig b/stage0/sema_tests/clz.zig new file mode 100644 index 0000000000..c7eb15de02 --- /dev/null +++ b/stage0/sema_tests/clz.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return @clz(x); } diff --git a/stage0/sema_tests/compare_eq.zig b/stage0/sema_tests/compare_eq.zig new file mode 100644 index 0000000000..a87b2287dd --- /dev/null +++ b/stage0/sema_tests/compare_eq.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) bool { return x == y; } diff --git a/stage0/sema_tests/compare_lt.zig b/stage0/sema_tests/compare_lt.zig new file mode 100644 index 0000000000..80dc29e87b --- /dev/null +++ b/stage0/sema_tests/compare_lt.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) bool { return x < y; } diff --git a/stage0/sema_tests/const_decl.zig b/stage0/sema_tests/const_decl.zig new file mode 100644 index 0000000000..0773757932 --- /dev/null +++ b/stage0/sema_tests/const_decl.zig @@ -0,0 +1 @@ +const x = 0; diff --git a/stage0/sema_tests/ctz.zig b/stage0/sema_tests/ctz.zig new file mode 100644 index 0000000000..c7a8bc7438 --- /dev/null +++ b/stage0/sema_tests/ctz.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return @ctz(x); } diff --git a/stage0/sema_tests/double_negate.zig b/stage0/sema_tests/double_negate.zig new file mode 100644 index 0000000000..0aea97ac44 --- /dev/null +++ b/stage0/sema_tests/double_negate.zig @@ -0,0 +1 @@ +export fn f(x: i32) i32 { return -(-x); } diff --git a/stage0/sema_tests/empty.zig b/stage0/sema_tests/empty.zig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage0/sema_tests/empty_void_function.zig b/stage0/sema_tests/empty_void_function.zig new file mode 100644 index 0000000000..c82f77fd3b --- /dev/null +++ b/stage0/sema_tests/empty_void_function.zig @@ -0,0 +1 @@ +export fn f() void {} diff --git a/stage0/sema_tests/f16_add.zig b/stage0/sema_tests/f16_add.zig new file mode 100644 index 0000000000..638d1fd899 --- /dev/null +++ b/stage0/sema_tests/f16_add.zig @@ -0,0 +1 @@ +export fn f(x: f16, y: f16) f16 { return x + y; } diff --git a/stage0/sema_tests/f32_arithmetic.zig b/stage0/sema_tests/f32_arithmetic.zig new file mode 100644 index 0000000000..9b44339ae3 --- /dev/null +++ b/stage0/sema_tests/f32_arithmetic.zig @@ -0,0 +1 @@ +export fn f(x: f32, y: f32) f32 { return x + y; } diff --git a/stage0/sema_tests/f64_div.zig b/stage0/sema_tests/f64_div.zig new file mode 100644 index 0000000000..ee71e50d38 --- /dev/null +++ b/stage0/sema_tests/f64_div.zig @@ -0,0 +1 @@ +export fn f(x: f64, y: f64) f64 { return x / y; } diff --git a/stage0/sema_tests/f64_mul.zig b/stage0/sema_tests/f64_mul.zig new file mode 100644 index 0000000000..6f743309af --- /dev/null +++ b/stage0/sema_tests/f64_mul.zig @@ -0,0 +1 @@ +export fn f(x: f64, y: f64) f64 { return x * y; } diff --git a/stage0/sema_tests/float_cast_f16_to_f32.zig b/stage0/sema_tests/float_cast_f16_to_f32.zig new file mode 100644 index 0000000000..47c2161976 --- /dev/null +++ b/stage0/sema_tests/float_cast_f16_to_f32.zig @@ -0,0 +1 @@ +export fn f(x: f16) f32 { return @floatCast(x); } diff --git a/stage0/sema_tests/float_cast_narrow.zig b/stage0/sema_tests/float_cast_narrow.zig new file mode 100644 index 0000000000..d68d7c482c --- /dev/null +++ b/stage0/sema_tests/float_cast_narrow.zig @@ -0,0 +1 @@ +export fn f(x: f64) f32 { return @floatCast(x); } diff --git a/stage0/sema_tests/float_cast_widen.zig b/stage0/sema_tests/float_cast_widen.zig new file mode 100644 index 0000000000..7fafde8fe8 --- /dev/null +++ b/stage0/sema_tests/float_cast_widen.zig @@ -0,0 +1 @@ +export fn f(x: f32) f64 { return @floatCast(x); } diff --git a/stage0/sema_tests/float_from_int.zig b/stage0/sema_tests/float_from_int.zig new file mode 100644 index 0000000000..a537c289f4 --- /dev/null +++ b/stage0/sema_tests/float_from_int.zig @@ -0,0 +1 @@ +export fn f(x: u32) f32 { return @floatFromInt(x); } diff --git a/stage0/sema_tests/identity_function.zig b/stage0/sema_tests/identity_function.zig new file mode 100644 index 0000000000..3a6d185ef2 --- /dev/null +++ b/stage0/sema_tests/identity_function.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x; } diff --git a/stage0/sema_tests/if_else_block_result.zig b/stage0/sema_tests/if_else_block_result.zig new file mode 100644 index 0000000000..9d91a192f8 --- /dev/null +++ b/stage0/sema_tests/if_else_block_result.zig @@ -0,0 +1,4 @@ +export fn f(a: u32, b: u32) u32 { + const x = if (a > b) a else b; + return x; +} diff --git a/stage0/sema_tests/if_simple.zig b/stage0/sema_tests/if_simple.zig new file mode 100644 index 0000000000..8e6b605fcd --- /dev/null +++ b/stage0/sema_tests/if_simple.zig @@ -0,0 +1,4 @@ +export fn f(x: u32, y: u32) u32 { + if (x > y) return x; + return y; +} diff --git a/stage0/sema_tests/if_with_early_return.zig b/stage0/sema_tests/if_with_early_return.zig new file mode 100644 index 0000000000..8e6b605fcd --- /dev/null +++ b/stage0/sema_tests/if_with_early_return.zig @@ -0,0 +1,4 @@ +export fn f(x: u32, y: u32) u32 { + if (x > y) return x; + return y; +} diff --git a/stage0/sema_tests/inline_fn_with_call_inside_conditional.zig b/stage0/sema_tests/inline_fn_with_call_inside_conditional.zig new file mode 100644 index 0000000000..8720cb5a10 --- /dev/null +++ b/stage0/sema_tests/inline_fn_with_call_inside_conditional.zig @@ -0,0 +1,11 @@ +fn bar(p: *u32) void { + p.* += 1; +} +inline fn baz(a: u32, x: *u32) void { + if (a < 10) bar(x); +} +export fn f(a: u32) u32 { + var x: u32 = a; + baz(a, &x); + return x; +} diff --git a/stage0/sema_tests/inline_fn_with_generic_call_inside_conditional.zig b/stage0/sema_tests/inline_fn_with_generic_call_inside_conditional.zig new file mode 100644 index 0000000000..e3d5647cdf --- /dev/null +++ b/stage0/sema_tests/inline_fn_with_generic_call_inside_conditional.zig @@ -0,0 +1,13 @@ +fn normalize(comptime T: type, p: *T) i32 { + p.* +%= 1; + return 1; +} +inline fn mulf(comptime T: type, a: T) T { + var x: T = a; + var scale: i32 = 0; + if (x < 10) scale += normalize(T, &x); + return x +% @as(T, @intCast(@as(u32, @bitCast(scale)))); +} +export fn f(a: u32) u32 { + return mulf(u32, a); +} diff --git a/stage0/sema_tests/inline_fn_with_plus_eq_call_inside_conditional.zig b/stage0/sema_tests/inline_fn_with_plus_eq_call_inside_conditional.zig new file mode 100644 index 0000000000..d03fc6b726 --- /dev/null +++ b/stage0/sema_tests/inline_fn_with_plus_eq_call_inside_conditional.zig @@ -0,0 +1,11 @@ +fn bar(p: *u32) u32 { + return p.* + 1; +} +inline fn baz(a: u32, x: *u32) void { + if (a < 10) x.* += bar(x); +} +export fn f(a: u32) u32 { + var x: u32 = a; + baz(a, &x); + return x; +} diff --git a/stage0/sema_tests/inline_fn_with_plus_eq_call_inside_two_conditionals.zig b/stage0/sema_tests/inline_fn_with_plus_eq_call_inside_two_conditionals.zig new file mode 100644 index 0000000000..0a4a0c01bf --- /dev/null +++ b/stage0/sema_tests/inline_fn_with_plus_eq_call_inside_two_conditionals.zig @@ -0,0 +1,13 @@ +fn bar(p: *u32) u32 { + return p.* + 1; +} +inline fn baz(a: u32, x: *u32, y: *u32) void { + if (a < 10) x.* += bar(x); + if (a < 20) y.* += bar(y); +} +export fn f(a: u32) u32 { + var x: u32 = a; + var y: u32 = a; + baz(a, &x, &y); + return x +% y; +} diff --git a/stage0/sema_tests/inline_fn_with_two_generic_calls_in_conditionals.zig b/stage0/sema_tests/inline_fn_with_two_generic_calls_in_conditionals.zig new file mode 100644 index 0000000000..580895a5c2 --- /dev/null +++ b/stage0/sema_tests/inline_fn_with_two_generic_calls_in_conditionals.zig @@ -0,0 +1,15 @@ +fn normalize(comptime T: type, p: *T) i32 { + p.* +%= 1; + return 1; +} +inline fn mulf(comptime T: type, a: T, b: T) T { + var x: T = a; + var y: T = b; + var scale: i32 = 0; + if (x < 10) scale += normalize(T, &x); + if (y < 10) scale += normalize(T, &y); + return x +% y +% @as(T, @intCast(@as(u32, @bitCast(scale)))); +} +export fn f(a: u32, b: u32) u32 { + return mulf(u32, a, b); +} diff --git a/stage0/sema_tests/int_from_float.zig b/stage0/sema_tests/int_from_float.zig new file mode 100644 index 0000000000..3a6705087c --- /dev/null +++ b/stage0/sema_tests/int_from_float.zig @@ -0,0 +1 @@ +export fn f(x: f32) u32 { return @intFromFloat(x); } diff --git a/stage0/sema_tests/intcast.zig b/stage0/sema_tests/intcast.zig new file mode 100644 index 0000000000..f35ff4cba8 --- /dev/null +++ b/stage0/sema_tests/intcast.zig @@ -0,0 +1 @@ +export fn f(x: u16) u32 { return @intCast(x); } diff --git a/stage0/sema_tests/intcast_computed_dest_type.zig b/stage0/sema_tests/intcast_computed_dest_type.zig new file mode 100644 index 0000000000..aafbf7d002 --- /dev/null +++ b/stage0/sema_tests/intcast_computed_dest_type.zig @@ -0,0 +1,3 @@ +export fn f(x: u16) u32 { + return @intCast(x); +} diff --git a/stage0/sema_tests/intfrombool.zig b/stage0/sema_tests/intfrombool.zig new file mode 100644 index 0000000000..500ba3de8b --- /dev/null +++ b/stage0/sema_tests/intfrombool.zig @@ -0,0 +1 @@ +export fn f(x: bool) u32 { return @intFromBool(x); } diff --git a/stage0/sema_tests/load_from_pointer.zig b/stage0/sema_tests/load_from_pointer.zig new file mode 100644 index 0000000000..c367154d95 --- /dev/null +++ b/stage0/sema_tests/load_from_pointer.zig @@ -0,0 +1,3 @@ +export fn f(p: *u32) u32 { + return p.*; +} diff --git a/stage0/sema_tests/local_const_binding.zig b/stage0/sema_tests/local_const_binding.zig new file mode 100644 index 0000000000..0c1c5519ac --- /dev/null +++ b/stage0/sema_tests/local_const_binding.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { const y = x + 1; return y; } diff --git a/stage0/sema_tests/max_float.zig b/stage0/sema_tests/max_float.zig new file mode 100644 index 0000000000..e263d61c4f --- /dev/null +++ b/stage0/sema_tests/max_float.zig @@ -0,0 +1 @@ +export fn f(x: f64, y: f64) f64 { return @max(x, y); } diff --git a/stage0/sema_tests/min_float.zig b/stage0/sema_tests/min_float.zig new file mode 100644 index 0000000000..cdc81e18b1 --- /dev/null +++ b/stage0/sema_tests/min_float.zig @@ -0,0 +1 @@ +export fn f(x: f64, y: f64) f64 { return @min(x, y); } diff --git a/stage0/sema_tests/mixed_arithmetic_and_bitwise.zig b/stage0/sema_tests/mixed_arithmetic_and_bitwise.zig new file mode 100644 index 0000000000..241d3512fb --- /dev/null +++ b/stage0/sema_tests/mixed_arithmetic_and_bitwise.zig @@ -0,0 +1,3 @@ +export fn f(a: u32, b: u32) u32 { + return (a + b) & 0xFF; +} diff --git a/stage0/sema_tests/mul_comptime_int.zig b/stage0/sema_tests/mul_comptime_int.zig new file mode 100644 index 0000000000..2b7ce40e26 --- /dev/null +++ b/stage0/sema_tests/mul_comptime_int.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x * 3; } diff --git a/stage0/sema_tests/mul_sat.zig b/stage0/sema_tests/mul_sat.zig new file mode 100644 index 0000000000..662bd4abb3 --- /dev/null +++ b/stage0/sema_tests/mul_sat.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x *| y; } diff --git a/stage0/sema_tests/mul_two_args.zig b/stage0/sema_tests/mul_two_args.zig new file mode 100644 index 0000000000..3ced34343a --- /dev/null +++ b/stage0/sema_tests/mul_two_args.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x * y; } diff --git a/stage0/sema_tests/multi_param_function.zig b/stage0/sema_tests/multi_param_function.zig new file mode 100644 index 0000000000..575d8ba7c2 --- /dev/null +++ b/stage0/sema_tests/multi_param_function.zig @@ -0,0 +1,3 @@ +export fn f(a: u32, b: u32, c: u32) u32 { + return (a + b) * c; +} diff --git a/stage0/sema_tests/multiple_operations.zig b/stage0/sema_tests/multiple_operations.zig new file mode 100644 index 0000000000..27142ec3e2 --- /dev/null +++ b/stage0/sema_tests/multiple_operations.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return (x + y) ^ 0xFF; } diff --git a/stage0/sema_tests/multiple_return_paths.zig b/stage0/sema_tests/multiple_return_paths.zig new file mode 100644 index 0000000000..7a9557dd16 --- /dev/null +++ b/stage0/sema_tests/multiple_return_paths.zig @@ -0,0 +1,6 @@ +export fn f(x: u32) u32 { + return x + 1; +} +export fn g(x: u32) u32 { + return x * 2; +} diff --git a/stage0/sema_tests/negate.zig b/stage0/sema_tests/negate.zig new file mode 100644 index 0000000000..12a934e94f --- /dev/null +++ b/stage0/sema_tests/negate.zig @@ -0,0 +1 @@ +export fn f(x: i32) i32 { return -x; } diff --git a/stage0/sema_tests/neghf2_inline_equivalent.zig b/stage0/sema_tests/neghf2_inline_equivalent.zig new file mode 100644 index 0000000000..a4a9d5646e --- /dev/null +++ b/stage0/sema_tests/neghf2_inline_equivalent.zig @@ -0,0 +1,3 @@ +export fn f(a: f16) f16 { + return @bitCast(@as(u16, @bitCast(a)) ^ @as(u16, 0x8000)); +} diff --git a/stage0/sema_tests/nested_bitcast_xor.zig b/stage0/sema_tests/nested_bitcast_xor.zig new file mode 100644 index 0000000000..9ca361841c --- /dev/null +++ b/stage0/sema_tests/nested_bitcast_xor.zig @@ -0,0 +1,3 @@ +export fn f(a: f32) f32 { + return @bitCast(@as(u32, @bitCast(a)) ^ @as(u32, 0x80000000)); +} diff --git a/stage0/sema_tests/nested_if.zig b/stage0/sema_tests/nested_if.zig new file mode 100644 index 0000000000..671157e9af --- /dev/null +++ b/stage0/sema_tests/nested_if.zig @@ -0,0 +1,7 @@ +export fn f(a: u32, b: u32) u32 { + if (a > 0) { + if (b > 0) return a + b; + return a; + } + return b; +} diff --git a/stage0/sema_tests/plus_eq_with_call_inside_conditional.zig b/stage0/sema_tests/plus_eq_with_call_inside_conditional.zig new file mode 100644 index 0000000000..b3be6edea5 --- /dev/null +++ b/stage0/sema_tests/plus_eq_with_call_inside_conditional.zig @@ -0,0 +1,8 @@ +fn bar(p: *u32) u32 { + return p.* + 1; +} +export fn f(a: u32) u32 { + var x: u32 = a; + if (a < 10) x += bar(&x); + return x; +} diff --git a/stage0/sema_tests/pointer_param_identity.zig b/stage0/sema_tests/pointer_param_identity.zig new file mode 100644 index 0000000000..799e55964d --- /dev/null +++ b/stage0/sema_tests/pointer_param_identity.zig @@ -0,0 +1 @@ +export fn f(x: *u32) *u32 { return x; } diff --git a/stage0/sema_tests/popcount.zig b/stage0/sema_tests/popcount.zig new file mode 100644 index 0000000000..92c5700dd9 --- /dev/null +++ b/stage0/sema_tests/popcount.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return @popCount(x); } diff --git a/stage0/sema_tests/return_integer.zig b/stage0/sema_tests/return_integer.zig new file mode 100644 index 0000000000..fde8b1c9a6 --- /dev/null +++ b/stage0/sema_tests/return_integer.zig @@ -0,0 +1 @@ +export fn f() u32 { return 42; } diff --git a/stage0/sema_tests/return_ptr_type.zig b/stage0/sema_tests/return_ptr_type.zig new file mode 100644 index 0000000000..8f8433690a --- /dev/null +++ b/stage0/sema_tests/return_ptr_type.zig @@ -0,0 +1 @@ +export fn f(p: *u32) *u32 { return p; } diff --git a/stage0/sema_tests/same_file_inline_call_with_bitcast_and_xor.zig b/stage0/sema_tests/same_file_inline_call_with_bitcast_and_xor.zig new file mode 100644 index 0000000000..076f328791 --- /dev/null +++ b/stage0/sema_tests/same_file_inline_call_with_bitcast_and_xor.zig @@ -0,0 +1,6 @@ +inline fn flip_sign(x: u16) u16 { + return x ^ 0x8000; +} +export fn f(a: u16) u16 { + return flip_sign(a); +} diff --git a/stage0/sema_tests/same_file_inline_call_with_two_args.zig b/stage0/sema_tests/same_file_inline_call_with_two_args.zig new file mode 100644 index 0000000000..408824b282 --- /dev/null +++ b/stage0/sema_tests/same_file_inline_call_with_two_args.zig @@ -0,0 +1,6 @@ +inline fn my_add(x: u32, y: u32) u32 { + return x + y; +} +export fn f(a: u32, b: u32) u32 { + return my_add(a, b); +} diff --git a/stage0/sema_tests/same_file_inline_function_call.zig b/stage0/sema_tests/same_file_inline_function_call.zig new file mode 100644 index 0000000000..527182aa8c --- /dev/null +++ b/stage0/sema_tests/same_file_inline_function_call.zig @@ -0,0 +1,6 @@ +inline fn negate(x: u16) u16 { + return ~x; +} +export fn f(a: u16) u16 { + return negate(a); +} diff --git a/stage0/sema_tests/shift_and_mask.zig b/stage0/sema_tests/shift_and_mask.zig new file mode 100644 index 0000000000..d1652e98a5 --- /dev/null +++ b/stage0/sema_tests/shift_and_mask.zig @@ -0,0 +1,3 @@ +export fn f(x: u32) u32 { + return (x >> 8) & 0xFF; +} diff --git a/stage0/sema_tests/shl_sat.zig b/stage0/sema_tests/shl_sat.zig new file mode 100644 index 0000000000..4b897353f7 --- /dev/null +++ b/stage0/sema_tests/shl_sat.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x <<| 1; } diff --git a/stage0/sema_tests/store_runtime_value.zig b/stage0/sema_tests/store_runtime_value.zig new file mode 100644 index 0000000000..4d53e91c3d --- /dev/null +++ b/stage0/sema_tests/store_runtime_value.zig @@ -0,0 +1,3 @@ +export fn f(p: *u32, x: u32) void { + p.* = x; +} diff --git a/stage0/sema_tests/store_to_pointer.zig b/stage0/sema_tests/store_to_pointer.zig new file mode 100644 index 0000000000..f19e4e5d4e --- /dev/null +++ b/stage0/sema_tests/store_to_pointer.zig @@ -0,0 +1,3 @@ +export fn f(x: *u32) void { + x.* = 42; +} diff --git a/stage0/sema_tests/sub_comptime.zig b/stage0/sema_tests/sub_comptime.zig new file mode 100644 index 0000000000..2148b55777 --- /dev/null +++ b/stage0/sema_tests/sub_comptime.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x - 1; } diff --git a/stage0/sema_tests/sub_sat.zig b/stage0/sema_tests/sub_sat.zig new file mode 100644 index 0000000000..b949dacbb5 --- /dev/null +++ b/stage0/sema_tests/sub_sat.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x -| y; } diff --git a/stage0/sema_tests/sub_two_args.zig b/stage0/sema_tests/sub_two_args.zig new file mode 100644 index 0000000000..300ac3fc9c --- /dev/null +++ b/stage0/sema_tests/sub_two_args.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x - y; } diff --git a/stage0/sema_tests/truncate.zig b/stage0/sema_tests/truncate.zig new file mode 100644 index 0000000000..4140bff03c --- /dev/null +++ b/stage0/sema_tests/truncate.zig @@ -0,0 +1 @@ +export fn f(x: u32) u16 { return @truncate(x); } diff --git a/stage0/sema_tests/two_local_bindings.zig b/stage0/sema_tests/two_local_bindings.zig new file mode 100644 index 0000000000..babbed8660 --- /dev/null +++ b/stage0/sema_tests/two_local_bindings.zig @@ -0,0 +1,5 @@ +export fn f(x: u32, y: u32) u32 { + const a = x + 1; + const b = y + 2; + return a ^ b; +} diff --git a/stage0/sema_tests/var_assignment_in_if.zig b/stage0/sema_tests/var_assignment_in_if.zig new file mode 100644 index 0000000000..c977e08829 --- /dev/null +++ b/stage0/sema_tests/var_assignment_in_if.zig @@ -0,0 +1,7 @@ +export fn f(a: u32, b: u32) u32 { + var x = a; + if (b > a) { + x = b; + } + return x; +} diff --git a/stage0/sema_tests/var_bitcast_and_if.zig b/stage0/sema_tests/var_bitcast_and_if.zig new file mode 100644 index 0000000000..ac061d11e3 --- /dev/null +++ b/stage0/sema_tests/var_bitcast_and_if.zig @@ -0,0 +1,7 @@ +export fn f(a: f16) u16 { + var x: u16 = @bitCast(a); + if (x > 100) { + x = x - 1; + } + return x; +} diff --git a/stage0/sema_tests/wrapping_add.zig b/stage0/sema_tests/wrapping_add.zig new file mode 100644 index 0000000000..299ac4e730 --- /dev/null +++ b/stage0/sema_tests/wrapping_add.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x +% y; } diff --git a/stage0/sema_tests/wrapping_add_comptime.zig b/stage0/sema_tests/wrapping_add_comptime.zig new file mode 100644 index 0000000000..8d59490fb4 --- /dev/null +++ b/stage0/sema_tests/wrapping_add_comptime.zig @@ -0,0 +1 @@ +export fn f(x: u32) u32 { return x +% 1; } diff --git a/stage0/sema_tests/wrapping_mul.zig b/stage0/sema_tests/wrapping_mul.zig new file mode 100644 index 0000000000..6c4b369fbd --- /dev/null +++ b/stage0/sema_tests/wrapping_mul.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x *% y; } diff --git a/stage0/sema_tests/wrapping_negate.zig b/stage0/sema_tests/wrapping_negate.zig new file mode 100644 index 0000000000..92d96b8e41 --- /dev/null +++ b/stage0/sema_tests/wrapping_negate.zig @@ -0,0 +1 @@ +export fn f(x: i32) i32 { return -%x; } diff --git a/stage0/sema_tests/wrapping_sub.zig b/stage0/sema_tests/wrapping_sub.zig new file mode 100644 index 0000000000..2487332296 --- /dev/null +++ b/stage0/sema_tests/wrapping_sub.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x -% y; } diff --git a/stage0/sema_tests/wrapping_sub_in_expr.zig b/stage0/sema_tests/wrapping_sub_in_expr.zig new file mode 100644 index 0000000000..eb28d450c9 --- /dev/null +++ b/stage0/sema_tests/wrapping_sub_in_expr.zig @@ -0,0 +1,3 @@ +export fn f(a: u32) u32 { + return a -% 1; +} diff --git a/stage0/sema_tests/xor_comptime_int.zig b/stage0/sema_tests/xor_comptime_int.zig new file mode 100644 index 0000000000..397c62e2ad --- /dev/null +++ b/stage0/sema_tests/xor_comptime_int.zig @@ -0,0 +1 @@ +export fn f(x: u16) u16 { return x ^ 0x8000; } diff --git a/stage0/sema_tests/xor_two_args.zig b/stage0/sema_tests/xor_two_args.zig new file mode 100644 index 0000000000..b5abaecd06 --- /dev/null +++ b/stage0/sema_tests/xor_two_args.zig @@ -0,0 +1 @@ +export fn f(x: u32, y: u32) u32 { return x ^ y; } diff --git a/stage0/stages_test.zig b/stage0/stages_test.zig index 2875d0ef96..a82c1c5df8 100644 --- a/stage0/stages_test.zig +++ b/stage0/stages_test.zig @@ -8,12 +8,13 @@ const astgen_test = @import("astgen_test.zig"); const sema_test = @import("sema_test.zig"); const c = parser_test.c; const sc = sema_test.c; +const corpus = @import("corpus.zig"); test "stages: corpus" { - @setEvalBranchQuota(corpus_files.len * 2); + @setEvalBranchQuota(corpus.files.len * 2); const gpa = std.testing.allocator; - inline for (corpus_files) |path| { - stagesCheck(gpa, path, @embedFile(path)) catch { + inline for (corpus.files[0..corpus.num_passing]) |path| { + stagesCheck(gpa, path, @embedFile("../" ++ path)) catch { std.debug.print("FAIL: {s}\n", .{path}); return error.TestFailed; }; @@ -55,12 +56,11 @@ fn stagesCheck(gpa: Allocator, comptime path: []const u8, source: [:0]const u8) try astgen_test.expectEqualZir(gpa, ref_zir, c_zir); - // Stage 3: Sema — compare C and Zig raw Air arrays + // Stage 3: Sema — compare C sema vs pre-computed AIR { // Symlink to the repo root inside a tmpDir so relative imports - // resolve within the module root, paths stay under .zig-cache/tmp/ - // to avoid 'std' module conflicts with lib/std/, and parallel - // test runs (all-zig0) don't race on the same symlink. + // resolve within the module root, and paths stay under .zig-cache/tmp/ + // to avoid 'std' module conflicts with lib/std/. const this_dir = comptime std.fs.path.dirname(@src().file) orelse "."; var tmp = std.testing.tmpDir(.{}); @@ -71,27 +71,14 @@ fn stagesCheck(gpa: Allocator, comptime path: []const u8, source: [:0]const u8) tmp.dir.symLink(abs_repo_root, "root", .{ .is_directory = true }) catch return error.SymlinkCreate; - // Get the tmpDir's absolute path (without following the "root" symlink). - // Paths must go *through* the symlink so the Zig compiler doesn't see - // the real repo root (which would conflict with lib/std/). var tmp_abs_buf: [std.fs.max_path_bytes]u8 = undefined; const tmp_abs = tmp.dir.realpathZ(".", &tmp_abs_buf) catch return error.ResolvePath; - // All corpus paths start with "../"; strip to get repo-relative path. - const repo_relative = comptime blk: { - if (!std.mem.startsWith(u8, path, "../")) - @compileError("corpus path must start with '../'"); - break :blk path["../".len..]; - }; - - // Build paths through the symlink by concatenation. - const repo_dir = comptime std.fs.path.dirname(repo_relative) orelse "."; + const repo_dir = comptime std.fs.path.dirname(path) orelse "."; var source_dir_buf: [std.fs.max_path_bytes:0]u8 = undefined; const source_dir_path = std.fmt.bufPrintZ(&source_dir_buf, "{s}/root/{s}", .{ tmp_abs, repo_dir }) catch unreachable; var module_root_buf: [std.fs.max_path_bytes:0]u8 = undefined; const module_root_path = std.fmt.bufPrintZ(&module_root_buf, "{s}/root", .{tmp_abs}) catch unreachable; - var test_src_buf: [std.fs.max_path_bytes:0]u8 = undefined; - const test_src_path = std.fmt.bufPrintZ(&test_src_buf, "{s}/root/{s}", .{ tmp_abs, repo_relative }) catch unreachable; var c_ip = sc.ipInit(); defer sc.ipDeinit(&c_ip); @@ -103,1127 +90,9 @@ fn stagesCheck(gpa: Allocator, comptime path: []const u8, source: [:0]const u8) var c_func_air_list = sc.semaAnalyze(&c_sema); defer sc.semaFuncAirListDeinit(&c_func_air_list); - try sema_test.airCompare(test_src_path.ptr, module_root_path.ptr, c_func_air_list); + const air_data = @import("air_data").getData(path); + const precomputed = try sema_test.parsePrecomputedAir(gpa, air_data); + defer sema_test.freePrecomputedAir(gpa, precomputed); + try sema_test.airComparePrecomputed(precomputed, c_func_air_list); } } - -const last_successful_corpus = "../lib/std/os/linux/bpf/btf_ext.zig"; - -// find ../{lib,src} -name '*.zig' | xargs -n1 stat -c "%s %n" | sort -n | awk '{printf " \""$2"\", // "$1"\n"}' -const corpus_files = .{ - "../lib/std/crypto/codecs.zig", // 165 - "../lib/std/os/uefi/tables/table_header.zig", // 214 - "../lib/std/zig/llvm.zig", // 247 - "../lib/compiler_rt/neghf2.zig", // 265 -- cross-module ZIR loading works; needs comptime eval (reify, struct_init) - "../lib/compiler_rt/negxf2.zig", // 265 -- @export+func_fancy handled; body analysis incomplete - "../lib/compiler_rt/absvdi2.zig", // 311 -- needs alloc_mut, block, condbr, panic, call - "../lib/compiler_rt/absvsi2.zig", // 311 - "../lib/compiler_rt/absvti2.zig", // 314 - "../lib/compiler_rt/addhf3.zig", // 319 - "../lib/compiler_rt/addxf3.zig", // 323 - "../lib/compiler_rt/mulhf3.zig", // 323 - "../lib/compiler_rt/mulxf3.zig", // 323 - "../lib/compiler_rt/truncxfdf2.zig", // 333 - "../lib/compiler_rt/truncxfsf2.zig", // 333 - "../lib/std/crypto/pcurves/p256/field.zig", // 338 - "../lib/compiler_rt/fixhfdi.zig", // 341 - "../lib/compiler_rt/fixhfsi.zig", // 341 - "../lib/compiler_rt/fixxfdi.zig", // 341 - "../lib/compiler_rt/fixxfsi.zig", // 341 - "../lib/compiler_rt/unordhf2.zig", // 341 - "../lib/compiler_rt/unordxf2.zig", // 341 - "../lib/std/crypto/pcurves/secp256k1/field.zig", // 343 - "../lib/compiler_rt/divhf3.zig", // 344 - "../lib/compiler_rt/floatdihf.zig", // 347 - "../lib/compiler_rt/floatdixf.zig", // 347 - "../lib/compiler_rt/floatsihf.zig", // 347 - "../lib/compiler_rt/floatsixf.zig", // 347 - "../lib/compiler_rt/fixunshfdi.zig", // 350 - "../lib/compiler_rt/fixunshfsi.zig", // 350 - "../lib/compiler_rt/fixunsxfdi.zig", // 350 - "../lib/compiler_rt/fixunsxfsi.zig", // 350 - "../lib/compiler_rt/floatundihf.zig", // 353 - "../lib/compiler_rt/floatundixf.zig", // 353 - "../lib/compiler_rt/floatunsixf.zig", // 353 - "../lib/compiler_rt/truncxfhf2.zig", // 356 - "../lib/compiler_rt/floatunsihf.zig", // 357 - "../lib/compiler_rt/trunctfhf2.zig", // 359 - "../lib/compiler_rt/extendsfxf2.zig", // 360 - "../lib/compiler/aro/backend.zig", // 362 - "../lib/compiler_rt/extenddfxf2.zig", // 364 - "../lib/std/compress.zig", // 372 - "../lib/compiler_rt/extendhfdf2.zig", // 373 - "../lib/compiler_rt/extendhfxf2.zig", // 373 - "../lib/compiler_rt/extendhftf2.zig", // 376 - "../lib/std/crypto/pcurves/p384/field.zig", // 376 - "../lib/compiler_rt/subxf3.zig", // 399 - "../lib/compiler_rt/subhf3.zig", // 406 - "../lib/compiler_rt/negtf2.zig", // 409 - "../lib/std/os/linux/bpf/btf_ext.zig", // 419 - "../lib/compiler_rt/muldc3.zig", // 425 - "../lib/compiler_rt/mulhc3.zig", // 425 - "../lib/compiler_rt/mulsc3.zig", // 425 - "../lib/compiler_rt/mulxc3.zig", // 425 - "../lib/compiler_rt/divdc3.zig", // 434 - "../lib/compiler_rt/divhc3.zig", // 434 - "../lib/compiler_rt/divsc3.zig", // 434 - "../lib/compiler_rt/divxc3.zig", // 434 - "../lib/std/math/complex/abs.zig", // 452 - "../lib/c/common.zig", // 457 - "../lib/std/math/complex/arg.zig", // 458 - "../lib/std/math/complex/conj.zig", // 484 - "../lib/std/math/scalbn.zig", // 503 - "../lib/compiler_rt/negdf2.zig", // 530 -- comptime if on cross-module bool (want_aeabi) - "../lib/compiler_rt/negsf2.zig", // 530 -- comptime if on cross-module bool (want_aeabi) - "../lib/std/Random/SplitMix64.zig", // 530 - //"../lib/compiler_rt/gexf2.zig", // 531 - //"../lib/std/os/uefi/protocol/shell_parameters.zig", // 544 - //"../lib/c/strings.zig", // 549 - //"../lib/compiler_rt/fixdfei.zig", // 564 - //"../lib/compiler_rt/fixhfei.zig", // 564 - //"../lib/compiler_rt/fixsfei.zig", // 564 - //"../lib/compiler_rt/fixxfei.zig", // 564 - //"../lib/compiler_rt/fixtfei.zig", // 565 - //"../lib/compiler_rt/floateidf.zig", // 569 - //"../lib/compiler_rt/floateihf.zig", // 569 - //"../lib/compiler_rt/floateisf.zig", // 569 - //"../lib/compiler_rt/floateixf.zig", // 569 - //"../lib/c/inttypes.zig", // 570 - //"../lib/compiler_rt/floateitf.zig", // 571 - //"../lib/compiler_rt/fixunsdfei.zig", // 575 - //"../lib/compiler_rt/fixunshfei.zig", // 575 - //"../lib/compiler_rt/fixunssfei.zig", // 575 - //"../lib/compiler_rt/fixunsxfei.zig", // 575 - //"../lib/compiler_rt/fixunstfei.zig", // 576 - //"../lib/compiler_rt/floatuneidf.zig", // 577 - //"../lib/compiler_rt/floatuneihf.zig", // 577 - //"../lib/compiler_rt/floatuneisf.zig", // 577 - //"../lib/compiler_rt/floatuneixf.zig", // 577 - //"../lib/std/math/complex/cos.zig", // 577 - //"../lib/compiler_rt/floatuneitf.zig", // 579 - //"../lib/compiler_rt/multc3.zig", // 581 - //"../lib/compiler_rt/divtc3.zig", // 590 - //"../lib/compiler_rt/adddf3.zig", // 594 - //"../lib/compiler_rt/addsf3.zig", // 594 - //"../lib/compiler_rt/muldf3.zig", // 598 - //"../lib/compiler_rt/mulsf3.zig", // 598 - //"../lib/compiler_rt/truncdfsf2.zig", // 600 - //"../lib/std/math/complex/acos.zig", // 608 - //"../lib/std/math/complex/pow.zig", // 608 - //"../lib/compiler_rt/fixdfsi.zig", // 616 - //"../lib/compiler_rt/fixsfsi.zig", // 616 - //"../lib/compiler_rt/truncdfhf2.zig", // 616 - //"../lib/compiler_rt/floatsidf.zig", // 619 - //"../lib/compiler_rt/floatsisf.zig", // 619 - //"../lib/std/math/complex/log.zig", // 620 - //"../lib/std/math/complex/sin.zig", // 620 - //"../lib/std/math/complex/tan.zig", // 626 - //"../lib/compiler_rt/fixunsdfsi.zig", // 628 - //"../lib/compiler_rt/fixunssfsi.zig", // 628 - //"../lib/compiler_rt/floatunsidf.zig", // 628 - //"../lib/compiler_rt/floatunsisf.zig", // 628 - //"../lib/std/math/complex/proj.zig", // 628 - //"../lib/compiler_rt/unorddf2.zig", // 634 - //"../lib/compiler_rt/unordsf2.zig", // 634 - //"../lib/std/math/complex/asinh.zig", // 641 - //"../lib/std/dwarf/EH.zig", // 643 - //"../lib/compiler_rt/extendsfdf2.zig", // 644 - //"../lib/std/math/complex/atanh.zig", // 645 - //"../lib/compiler_rt/unordtf2.zig", // 656 - //"../lib/std/Target/generic.zig", // 665 - //"../lib/compiler_rt/absv.zig", // 671 - //"../lib/std/math/complex/acosh.zig", // 678 - //"../lib/compiler_rt/fixdfdi.zig", // 701 - //"../lib/compiler_rt/fixsfdi.zig", // 701 - //"../lib/compiler_rt/floatdidf.zig", // 704 - //"../lib/compiler_rt/floatdisf.zig", // 704 - //"../lib/compiler_rt/floattidf.zig", // 712 - //"../lib/compiler_rt/floattihf.zig", // 712 - //"../lib/compiler_rt/floattisf.zig", // 712 - //"../lib/compiler_rt/floattixf.zig", // 712 - //"../lib/compiler_rt/fixdfti.zig", // 713 - //"../lib/compiler_rt/fixhfti.zig", // 713 - //"../lib/compiler_rt/fixsfti.zig", // 713 - //"../lib/compiler_rt/fixunsdfdi.zig", // 713 - //"../lib/compiler_rt/fixunssfdi.zig", // 713 - //"../lib/compiler_rt/fixxfti.zig", // 713 - //"../lib/compiler_rt/floatundidf.zig", // 713 - //"../lib/compiler_rt/floatundisf.zig", // 713 - //"../lib/compiler_rt/floatuntidf.zig", // 724 - //"../lib/compiler_rt/floatuntihf.zig", // 724 - //"../lib/compiler_rt/floatuntisf.zig", // 724 - //"../lib/compiler_rt/floatuntixf.zig", // 724 - //"../lib/compiler_rt/addtf3.zig", // 725 - //"../lib/compiler_rt/fixunsdfti.zig", // 731 - //"../lib/compiler_rt/fixunshfti.zig", // 731 - //"../lib/compiler_rt/fixunssfti.zig", // 731 - //"../lib/compiler_rt/fixunsxfti.zig", // 731 - //"../lib/compiler_rt/trunctfdf2.zig", // 731 - //"../lib/compiler_rt/trunctfsf2.zig", // 731 - //"../lib/compiler_rt/subdf3.zig", // 735 - //"../lib/compiler_rt/subsf3.zig", // 735 - //"../lib/compiler_rt/fixtfdi.zig", // 736 - //"../lib/compiler_rt/fixtfsi.zig", // 736 - //"../lib/compiler_rt/multf3.zig", // 737 - //"../lib/std/math/big.zig", // 746 - //"../lib/compiler_rt/floatditf.zig", // 748 - //"../lib/compiler_rt/floatsitf.zig", // 748 - //"../lib/std/math/complex/asin.zig", // 750 - //"../lib/compiler_rt/fixunstfdi.zig", // 754 - //"../lib/compiler_rt/fixunstfsi.zig", // 754 - //"../lib/init/src/root.zig", // 755 - //"../lib/compiler_rt/floatunditf.zig", // 761 - //"../lib/compiler_rt/floatunsitf.zig", // 761 - //"../lib/compiler_rt/udivti3.zig", // 770 - //"../lib/compiler_rt/extenddftf2.zig", // 781 - //"../lib/compiler_rt/extendsftf2.zig", // 781 - //"../lib/std/Build/Step/Fail.zig", // 831 -- 33 funcs in zig, 0 in C - //"../lib/std/crypto/test.zig", // 835 - //"../lib/compiler_rt/bswapsi2_test.zig", // 840 - //"../lib/compiler_rt/umodti3.zig", // 846 - //"../lib/std/os/windows/crypt32.zig", // 850 - //"../lib/compiler_rt/subvsi3.zig", // 860 - //"../lib/compiler_rt/fixtfti.zig", // 867 - //"../lib/compiler_rt/floattitf.zig", // 872 - //"../lib/compiler_rt/addvsi3.zig", // 874 - //"../lib/compiler_rt/bcmp.zig", // 874 - //"../lib/compiler_rt/memset.zig", // 876 - //"../lib/compiler_rt/truncsfhf2.zig", // 881 - //"../lib/compiler_rt/subtf3.zig", // 884 - //"../lib/compiler_rt/divti3_test.zig", // 886 - //"../lib/compiler_rt/udivmodti4.zig", // 886 - //"../lib/compiler_rt/floatuntitf.zig", // 888 - //"../lib/compiler_rt/fixunstfti.zig", // 891 - //"../lib/std/compress/lzma2.zig", // 894 - //"../lib/compiler_rt/mulvsi3.zig", // 902 - //"../lib/compiler_rt/bitreversesi2_test.zig", // 910 - //"../lib/compiler_rt/extendhfsf2.zig", // 920 - //"../lib/compiler_rt/memcmp.zig", // 931 - //"../lib/compiler_rt/subvdi3.zig", // 932 - //"../lib/init/src/main.zig", // 936 - //"../lib/compiler_rt/gehf2.zig", // 960 - //"../lib/compiler_rt/divsf3_test.zig", // 982 - //"../lib/compiler_rt/paritysi2_test.zig", // 989 - //"../lib/std/math/expo2.zig", // 995 - //"../lib/compiler_rt/paritydi2_test.zig", // 1016 - //"../lib/compiler_rt/popcountsi2_test.zig", // 1019 - //"../lib/compiler_rt/bswapdi2_test.zig", // 1036 - //"../lib/compiler_rt/negvsi2_test.zig", // 1038 - //"../lib/c.zig", // 1038 - //"../lib/compiler_rt/absvsi2_test.zig", // 1046 - //"../lib/compiler_rt/popcountdi2_test.zig", // 1046 - //"../lib/compiler_rt/divdf3_test.zig", // 1051 - //"../lib/c/stdlib.zig", // 1067 - //"../lib/compiler_rt/parityti2_test.zig", // 1078 - //"../lib/std/math/isfinite.zig", // 1083 - //"../lib/compiler_rt/bitreversedi2_test.zig", // 1102 - //"../lib/compiler_rt/popcountti2_test.zig", // 1111 - //"../lib/compiler_rt/divti3.zig", // 1113 - // "../lib/std/math/copysign.zig", // 1136 - //"../lib/compiler_rt/negXi2.zig", // 1171 - //"../lib/std/math/lcm.zig", // 1194 - // "../lib/std/Target/lanai.zig", // 1207 - //"../lib/compiler_rt/negvdi2_test.zig", // 1209 - //"../lib/compiler_rt/absvdi2_test.zig", // 1216 - //"../lib/std/Io/counting_reader.zig", // 1227 - // "../lib/std/Target/xcore.zig", // 1234 - //"../lib/std/zon.zig", // 1242 - //"../lib/compiler_rt/modti3_test.zig", // 1243 - // "../lib/std/valgrind/cachegrind.zig", // 1249 - //"../lib/std/Target/arc.zig", // 1274 - //"../lib/std/Target/xtensa.zig", // 1274 - //"../lib/std/Target/ve.zig", // 1276 - //"../lib/std/os/linux/ioctl.zig", // 1297 -- zig compile error (assert failure) - //"../lib/compiler_rt/negv.zig", // 1303 - //"../src/link/aarch64.zig", // 1350 - //"../lib/std/zig/perf_test.zig", // 1367 - //"../lib/compiler_rt/getf2.zig", // 1375 - //"../lib/compiler_rt/modti3.zig", // 1380 - //"../lib/compiler_rt/parity.zig", // 1385 - //"../lib/compiler_rt/bswapti2_test.zig", // 1390 - //"../lib/std/Target/propeller.zig", // 1396 - // "../lib/std/dwarf/FORM.zig", // 1399 - //"../lib/std/Build/Step/RemoveDir.zig", // 1443 - // "../lib/std/math/iszero.zig", // 1456 - //"../lib/std/Build/Step/InstallFile.zig", // 1460 - // "../lib/std/dwarf/ATE.zig", // 1479 - //"../lib/compiler_rt/bitreverseti2_test.zig", // 1488 - //"../lib/compiler/aro/aro.zig", // 1515 - // "../lib/std/os/uefi/protocol/simple_file_system.zig", // 1524 - //"../src/link/StringTable.zig", // 1542 - //"../lib/std/os/linux/bpf/kern.zig", // 1543 - // "../lib/std/math/signbit.zig", // 1557 - //"../lib/compiler_rt/gedf2.zig", // 1567 - //"../lib/compiler_rt/gesf2.zig", // 1567 - //"../lib/compiler_rt/negvti2_test.zig", // 1596 - //"../lib/compiler_rt/absvti2_test.zig", // 1603 - //"../lib/compiler_rt/extendxftf2.zig", // 1604 - //"../lib/std/zig/Client.zig", // 1605 - //"../lib/std/zig/primitives.zig", // 1666 - //"../lib/std/heap/ThreadSafeAllocator.zig", // 1681 - // "../lib/std/math/isnan.zig", // 1681 - // "../lib/std/os/uefi/protocol/hii_popup.zig", // 1712 - // "../lib/std/crypto/errors.zig", // 1715 - //"../lib/compiler_rt/subo.zig", // 1742 - // "../lib/std/os/uefi/protocol/loaded_image.zig", // 1743 - //"../lib/compiler/resinator/ani.zig", // 1748 - //"../lib/compiler_rt/addo.zig", // 1752 - //"../lib/compiler/aro/aro/pragmas/message.zig", // 1762 - // "../lib/std/math/isinf.zig", // 1775 - //"../lib/std/crypto/codecs/asn1/der.zig", // 1807 - //"../lib/std/Random/Ascon.zig", // 1811 - // "../lib/std/os/uefi/protocol/simple_text_input.zig", // 1827 - // "../lib/std/math/isnormal.zig", // 1837 - //"../lib/compiler_rt/ucmpsi2_test.zig", // 1859 - //"../lib/compiler/aro/aro/pragmas/once.zig", // 1866 - //"../lib/compiler/aro/backend/Object.zig", // 1871 - //"../lib/std/fs/wasi.zig", // 1888 - // "../lib/std/hash/fnv.zig", // 1890 - //"../lib/compiler_rt/fabs.zig", // 1913 - //"../lib/compiler_rt/popcount.zig", // 1916 - //"../lib/compiler_rt/fmodx_test.zig", // 1917 - // "../lib/std/math/log2.zig", // 1919 - //"../src/link/MachO/fat.zig", // 1919 - // "../lib/std/dwarf/LANG.zig", // 1963 - //"../lib/compiler_rt/cmp.zig", // 1971 - //"../src/link/MachO/uuid.zig", // 1984 - //"../lib/std/Thread/WaitGroup.zig", // 1988 - // "../lib/std/os/uefi/protocol/service_binding.zig", // 2001 - //"../lib/compiler_rt/mulc3_test.zig", // 2007 - // "../lib/std/once.zig", // 2016 -- resolveInst crash (generic type-returning fn) - // "../lib/std/math/gcd.zig", // 2024 - // "../lib/std/os/uefi/protocol/simple_pointer.zig", // 2028 - //"../lib/compiler_rt/divmodei4.zig", // 2047 - //"../lib/compiler_rt/fmodq_test.zig", // 2069 - //"../lib/compiler_rt/powiXf2.zig", // 2072 - //"../lib/std/hash/verify.zig", // 2075 - // "../lib/std/os/uefi/hii.zig", // 2078 - // "../lib/std/os/freebsd.zig", // 2097 - //"../lib/compiler/aro/backend/Ir/x86/Renderer.zig", // 2110 - // "../lib/std/os/plan9/x86_64.zig", // 2126 - //"../lib/std/Build/Cache/Directory.zig", // 2142 -- zig compile error (assert failure) - // "../lib/std/os/windows/advapi32.zig", // 2144 - //"../lib/std/os/windows/tls.zig", // 2159 -- zig compile error - //"../lib/compiler_rt/addodi4_test.zig", // 2183 - //"../lib/compiler_rt/ucmpdi2_test.zig", // 2186 - //"../src/print_env.zig", // 2196 - //"../src/link/table_section.zig", // 2197 - //"../lib/compiler_rt/addosi4_test.zig", // 2203 - //"../lib/std/unicode/throughput_test.zig", // 2206 - // "../lib/std/Target/msp430.zig", // 2227 - //"../lib/compiler_rt/rem_pio2f.zig", // 2247 - //"../lib/compiler_rt/cmpxf2.zig", // 2248 - //"../lib/compiler_rt/divtf3_test.zig", // 2251 - //"../lib/compiler_rt/cmphf2.zig", // 2267 - //"../lib/std/debug/Info.zig", // 2274 - //"../lib/compiler_rt/mulc3.zig", // 2275 - //"../lib/compiler_rt/divc3.zig", // 2280 - // "../lib/std/os/uefi/tables/system_table.zig", // 2295 - // "../lib/std/crypto/modes.zig", // 2303 - //"../lib/compiler_rt/addoti4_test.zig", // 2309 - //"../lib/compiler/aro/aro/Driver/Multilib.zig", // 2333 - //"../lib/std/debug/no_panic.zig", // 2349 - //"../lib/compiler_rt/divc3_test.zig", // 2360 - // "../lib/std/os/uefi/protocol.zig", // 2368 - // "../lib/std/os/uefi/protocol/absolute_pointer.zig", // 2398 - // "../lib/std/Target/bpf.zig", // 2425 - //"../lib/compiler_rt/subodi4_test.zig", // 2437 - //"../lib/std/zig/system/darwin.zig", // 2441 - //"../lib/std/crypto/codecs/asn1/test.zig", // 2452 - //"../lib/compiler_rt/subosi4_test.zig", // 2457 - //"../src/link/MachO/hasher.zig", // 2466 - // "../lib/std/os/uefi/protocol/edid.zig", // 2479 - // "../lib/std/valgrind/callgrind.zig", // 2493 - // "../lib/std/BitStack.zig", // 2525 - //"../lib/std/math/complex/atan.zig", // 2527 - // "../lib/std/math/log.zig", // 2531 - //"../lib/std/Thread/Mutex/Recursive.zig", // 2533 -- zig compile error - //"../lib/compiler/aro/aro/StringInterner.zig", // 2546 - //"../lib/compiler_rt/aulldiv.zig", // 2563 - //"../lib/compiler_rt/suboti4_test.zig", // 2563 - //"../lib/compiler_rt/aullrem.zig", // 2618 - //"../src/arch/sparc64/abi.zig", // 2631 - //"../lib/compiler_rt/mulo.zig", // 2643 - //"../src/codegen/mips/abi.zig", // 2649 - //"../lib/std/Thread/Semaphore.zig", // 2650 -- zig compile error (assert failure) - //"../lib/std/debug/FixedBufferReader.zig", // 2664 -- zig compile error - //"../lib/std/fs/get_app_data_dir.zig", // 2665 - // "../lib/std/Random/ChaCha.zig", // 2685 - //"../lib/std/Build/Step/Fmt.zig", // 2711 - //"../lib/std/math/complex/ldexp.zig", // 2726 - //"../lib/std/Random/Pcg.zig", // 2727 - //"../lib/std/crypto/hash_composition.zig", // 2756 - // "../lib/std/math/acosh.zig", // 2756 - //"../lib/compiler_rt/bitreverse.zig", // 2762 - // "../lib/std/os/uefi/tables/configuration_table.zig", // 2796 - // "../lib/std/hash/Adler32.zig", // 2797 - //"../lib/compiler_rt/ucmpti2_test.zig", // 2821 - // "../lib/std/math/sqrt.zig", // 2837 - //"../lib/compiler_rt/divxf3_test.zig", // 2844 - //"../lib/std/fs/AtomicFile.zig", // 2845 - //"../lib/compiler_rt/trunctfxf2.zig", // 2852 - //"../lib/compiler_rt/fmax.zig", // 2867 - //"../lib/compiler_rt/fmin.zig", // 2869 - //"../lib/compiler_rt/comparesf2_test.zig", // 2885 - //"../lib/std/Build/Step/CheckFile.zig", // 2901 - //"../src/RangeSet.zig", // 2942 - // "../lib/std/fmt/parse_float/convert_hex.zig", // 2950 - //"../lib/compiler_rt/os_version_check.zig", // 2988 - //"../lib/compiler_rt/comparedf2_test.zig", // 2991 - //"../lib/std/compress/lzma.zig", // 3010 - //"../src/link/Goff.zig", // 3063 - //"../lib/compiler_rt/mulXi3.zig", // 3064 - // "../lib/std/fmt/parse_float/FloatStream.zig", // 3073 - //"../src/link/Xcoff.zig", // 3078 - // "../lib/std/fmt/parse_float/common.zig", // 3081 - //"../lib/std/c/serenity.zig", // 3099 -- zig compile error - // "../lib/std/http/HeaderIterator.zig", // 3108 - //"../src/codegen/wasm/abi.zig", // 3121 - //"../lib/std/compress/lzma/test.zig", // 3123 - //"../lib/std/Io/Reader/Limited.zig", // 3139 -- zig compile error - // "../lib/std/Random/Sfc64.zig", // 3158 - //"../lib/compiler_rt/cmpdf2.zig", // 3161 - //"../lib/compiler_rt/cmpsf2.zig", // 3161 - // "../lib/std/Random/Xoshiro256.zig", // 3177 - //"../lib/compiler/aro/aro/features.zig", // 3198 - //"../lib/std/crypto/codecs/asn1/der/ArrayListReverse.zig", // 3221 - //"../lib/std/debug/simple_panic.zig", // 3221 - //"../lib/std/json/test.zig", // 3223 - // "../lib/std/Random/Xoroshiro128.zig", // 3242 - //"../lib/compiler_rt/bswap.zig", // 3260 - //"../lib/std/json/hashmap.zig", // 3272 - //"../src/arch/riscv64/mnem.zig", // 3375 - // "../lib/std/math/atanh.zig", // 3399 - //"../lib/std/compress/xz/test.zig", // 3461 - // "../lib/std/hash/crc/impl.zig", // 3506 - // "../lib/std/compress/flate/Lookup.zig", // 3588 - //"../lib/compiler/aro/aro/Pragma.zig", // 3611 - // "../lib/std/crypto/hmac.zig", // 3626 - //"../lib/compiler/aro/aro/Builtins/Properties.zig", // 3657 - // "../lib/std/Io/DeprecatedWriter.zig", // 3660 - //"../lib/compiler/aro/aro/Builtins/eval.zig", // 3669 - // "../lib/std/os/windows/lang.zig", // 3697 - // "../lib/std/Random/RomuTrio.zig", // 3699 - // "../lib/std/crypto/hkdf.zig", // 3703 - //"../lib/std/os/linux/vdso.zig", // 3762 - // "../lib/std/compress/lzma/vec2d.zig", // 3774 - // "../lib/std/http/ChunkParser.zig", // 3791 - //"../lib/compiler/resinator/utils.zig", // 3827 - // "../lib/std/math/complex/tanh.zig", // 3847 - //"../src/clang_options.zig", // 3858 - // "../lib/std/c/dragonfly.zig", // 3875 - //"../lib/std/crypto/Certificate/Bundle/macos.zig", // 3892 - //"../src/link/MachO/Thunk.zig", // 3897 - // "../lib/std/os/uefi/pool_allocator.zig", // 3906 - // "../lib/std/os/uefi/protocol/rng.zig", // 3924 - // "../lib/std/dwarf/TAG.zig", // 3939 - //"../src/print_zoir.zig", // 3961 - //"../src/link/riscv.zig", // 4045 - //"../lib/compiler_rt/int_from_float.zig", // 4079 - // "../lib/std/os/linux/bpf/btf.zig", // 4082 - //"../lib/compiler_rt/float_from_int.zig", // 4111 - // "../lib/std/hash.zig", // 4120 - //"../lib/compiler_rt/mulosi4_test.zig", // 4141 - // "../lib/std/math/cosh.zig", // 4157 - // "../lib/std/os/uefi/protocol/hii_database.zig", // 4199 - // "../lib/std/math/log_int.zig", // 4219 - //"../lib/std/Build/Step/UpdateSourceFiles.zig", // 4247 - //"../lib/compiler/aro/aro/Source.zig", // 4248 - // "../lib/std/math/complex/sqrt.zig", // 4249 - // "../lib/std/buf_map.zig", // 4266 - //"../lib/compiler/aro/aro/InitList.zig", // 4275 - //"../lib/compiler/aro/aro/Driver/GCCVersion.zig", // 4285 - //"../lib/compiler_rt/udivmod.zig", // 4285 - // "../lib/std/math/sinh.zig", // 4294 - // "../lib/std/os/uefi/protocol/graphics_output.zig", // 4296 - // "../lib/std/math/asinh.zig", // 4299 - // "../lib/std/os/linux/thumb.zig", // 4390 - //"../lib/std/Build/Step/InstallDir.zig", // 4431 - // "../lib/std/math/modf.zig", // 4458 - //"../lib/c/string.zig", // 4479 - //"../src/link/Elf/Thunk.zig", // 4479 - //"../lib/compiler_rt/trunc.zig", // 4509 - //"../lib/compiler_rt/ssp.zig", // 4524 - // "../lib/std/buf_set.zig", // 4526 - // "../lib/std/Random/ziggurat.zig", // 4526 - // "../lib/std/math/tanh.zig", // 4581 - //"../lib/compiler_rt/comparef.zig", // 4582 - //"../lib/compiler/aro/aro/annex_g.zig", // 4585 - //"../lib/std/fmt/parse_float/convert_slow.zig", // 4586 - //"../src/codegen/aarch64/abi.zig", // 4632 - //"../lib/compiler/resinator/disjoint_code_page.zig", // 4693 - //"../lib/std/compress/lzma2/decode.zig", // 4704 - //"../lib/compiler_rt/cmptf2.zig", // 4739 - // "../lib/std/math/hypot.zig", // 4748 - //"../lib/std/debug/MemoryAccessor.zig", // 4783 - //"../lib/std/Io/test.zig", // 4812 - // "../lib/std/math/cbrt.zig", // 4812 - //"../lib/compiler_rt/cmpsi2_test.zig", // 4815 - //"../lib/compiler_rt/shift.zig", // 4845 - //"../lib/std/os/uefi/protocol/device_path.zig", // 4860 -- zig compile error - //"../lib/compiler/libc.zig", // 4869 - // "../lib/std/os/uefi/protocol/serial_io.zig", // 4876 - // "../lib/std/dwarf.zig", // 4894 - // "../lib/std/math/complex/exp.zig", // 4899 - // "../lib/std/gpu.zig", // 4919 - // "../lib/std/compress/lzma/decode/rangecoder.zig", // 4994 - // "../lib/std/os/uefi/protocol/simple_text_input_ex.zig", // 5002 - // "../lib/std/Target/spirv.zig", // 5037 - //"../lib/compiler/resinator/preprocess.zig", // 5102 - //"../lib/compiler_rt/ceil.zig", // 5139 - //"../lib/compiler/aro/aro/Tree/number_affixes.zig", // 5167 - //"../lib/std/json/hashmap_test.zig", // 5171 - // "../lib/std/os/uefi/protocol/block_io.zig", // 5171 - //"../src/print_targets.zig", // 5189 - // "../lib/std/SinglyLinkedList.zig", // 5252 - //"../lib/docs/wasm/markdown/Document.zig", // 5303 - //"../lib/compiler_rt/round.zig", // 5307 - //"../lib/std/compress/xz.zig", // 5317 - // "../lib/std/math/asin.zig", // 5337 - //"../lib/compiler_rt/udivmodei4.zig", // 5345 - // "../lib/std/math/complex/sinh.zig", // 5363 - // "../lib/std/os/uefi/protocol/ip6_config.zig", // 5373 - // "../lib/std/math/acos.zig", // 5378 - // "../lib/std/fmt/parse_float/convert_fast.zig", // 5401 - //"../lib/compiler_rt/mulodi4_test.zig", // 5448 - //"../lib/std/json.zig", // 5465 - // "../lib/std/math/ilogb.zig", // 5519 - //"../src/link/Elf/relocation.zig", // 5540 - // "../lib/std/math/log10.zig", // 5553 - //"../lib/compiler/aro/aro/pragmas/pack.zig", // 5573 - //"../lib/std/crypto/pcurves/tests/p256.zig", // 5656 - //"../src/link/MachO/Relocation.zig", // 5676 - //"../lib/compiler_rt/cos.zig", // 5691 - //"../lib/std/Io/tty.zig", // 5692 - // "../lib/std/dwarf/OP.zig", // 5693 - //"../lib/std/testing/FailingAllocator.zig", // 5694 -- zig compile error - //"../src/codegen/arm/abi.zig", // 5805 - //"../lib/std/crypto/codecs/asn1/der/Decoder.zig", // 5806 - //"../lib/compiler_rt/cmpdi2_test.zig", // 5813 - // "../lib/std/math/complex/cosh.zig", // 5818 - //"../lib/std/crypto/codecs/asn1/der/Encoder.zig", // 5861 - //"../lib/std/crypto/tlcsprng.zig", // 5929 - // "../lib/std/compress/lzma/decode/lzbuffer.zig", // 5945 - //"../lib/compiler_rt/mulXi3_test.zig", // 5997 - //"../lib/compiler_rt/extendf.zig", // 6009 - // "../lib/std/meta/trailer_flags.zig", // 6027 - //"../lib/std/crypto/pcurves/tests/secp256k1.zig", // 6029 - // "../lib/std/fmt/parse_float/FloatInfo.zig", // 6036 - // "../lib/std/Io/fixed_buffer_stream.zig", // 6043 - //"../lib/compiler_rt/rem_pio2.zig", // 6045 - // "../lib/std/os/linux/hexagon.zig", // 6097 - // "../lib/std/Random/Isaac64.zig", // 6100 - //"../src/link/Wasm/Archive.zig", // 6115 - //"../lib/compiler_rt/tan.zig", // 6175 - //"../src/deprecated.zig", // 6187 - // "../lib/std/crypto/cmac.zig", // 6226 - //"../src/arch/riscv64/Mir.zig", // 6227 - //"../lib/std/Random/benchmark.zig", // 6230 - //"../lib/compiler_rt/floor.zig", // 6290 - // "../lib/std/crypto/isap.zig", // 6309 - //"../src/link/tapi.zig", // 6316 - //"../lib/std/compress/flate.zig", // 6341 - //"../lib/compiler_rt/addf3.zig", // 6348 - //"../lib/compiler_rt/memcpy.zig", // 6452 - //"../lib/compiler/aro/aro/Hideset.zig", // 6508 - // "../lib/std/Target/wasm.zig", // 6517 - //"../lib/compiler/aro/aro/LangOpts.zig", // 6529 - // "../lib/std/os/linux/riscv32.zig", // 6540 - // "../lib/std/os/linux/riscv64.zig", // 6541 - // "../lib/std/math/complex.zig", // 6563 - //"../lib/std/compress/zstd.zig", // 6605 - //"../lib/compiler_rt/fixint_test.zig", // 6606 - // "../lib/std/c/netbsd.zig", // 6617 - // "../lib/std/os/linux/m68k.zig", // 6634 - // "../lib/std/crypto/pcurves/p384/scalar.zig", // 6669 - //"../lib/compiler_rt/mulf3_test.zig", // 6670 - //"../lib/std/crypto/pcurves/tests/p384.zig", // 6707 - // "../lib/std/os/linux/aarch64.zig", // 6720 - //"../lib/std/zig/number_literal.zig", // 6720 - // "../lib/std/Target/loongarch.zig", // 6753 - // "../lib/std/time/epoch.zig", // 6764 - //"../lib/compiler_rt/sin.zig", // 6783 - // "../lib/std/math/ldexp.zig", // 6839 - //"../lib/std/crypto/aes_gcm.zig", // 6851 - //"../lib/compiler_rt/addf3_test.zig", // 6998 - // "../lib/std/Target/m68k.zig", // 7140 - //"../lib/std/compress/xz/block.zig", // 7157 - //"../lib/std/zig/Server.zig", // 7166 - //"../lib/compiler_rt/muloti4_test.zig", // 7168 - // "../lib/std/crypto/codecs/asn1/Oid.zig", // 7178 - // "../lib/std/os/linux/s390x.zig", // 7186 - //"../lib/build-web/main.zig", // 7209 - //"../lib/compiler_rt/memmove.zig", // 7246 - // "../lib/std/crypto/poly1305.zig", // 7259 - // "../lib/std/math/atan.zig", // 7275 - //"../src/link/Elf/gc.zig", // 7366 - //"../lib/compiler_rt/count0bits.zig", // 7394 - // "../lib/std/crypto/pcurves/p256/scalar.zig", // 7421 - // "../lib/std/crypto/pcurves/secp256k1/scalar.zig", // 7426 - //"../lib/std/heap/SmpAllocator.zig", // 7465 - //"../lib/std/heap/sbrk_allocator.zig", // 7469 - //"../src/Package.zig", // 7489 - //"../src/link/Elf/AtomList.zig", // 7524 - //"../lib/compiler/aro/aro/pragmas/gcc.zig", // 7526 - //"../lib/std/Build/Step/TranslateC.zig", // 7560 - // "../lib/std/valgrind/memcheck.zig", // 7574 - // "../lib/std/heap/FixedBufferAllocator.zig", // 7575 - // "../lib/std/dwarf/AT.zig", // 7632 - // "../lib/std/math/powi.zig", // 7647 - //"../lib/compiler_rt/clear_cache.zig", // 7746 - // "../lib/std/os/uefi.zig", // 7746 - //"../lib/std/Build/Step/InstallArtifact.zig", // 7843 - //"../src/link/MachO/dead_strip.zig", // 7873 - // "../lib/std/math/frexp.zig", // 7877 - // "../lib/std/os/linux/loongarch64.zig", // 7941 - //"../lib/std/std.zig", // 7957 - // "../lib/std/os/linux/arm.zig", // 7970 - //"../lib/std/crypto/25519/ristretto255.zig", // 7971 - //"../lib/std/json/dynamic.zig", // 7996 - //"../lib/compiler_rt/cmpti2_test.zig", // 8017 - //"../src/introspect.zig", // 8041 - // "../lib/std/heap/memory_pool.zig", // 8049 - //"../lib/std/Build/Cache/Path.zig", // 8052 -- zig compile error - //"../src/DarwinPosixSpawn.zig", // 8063 - //"../lib/compiler/aro/aro/Driver/Filesystem.zig", // 8091 - //"../lib/compiler_rt/extendf_test.zig", // 8104 - //"../lib/compiler_rt/truncf.zig", // 8121 - // "../lib/std/DoublyLinkedList.zig", // 8139 - //"../lib/std/Build/Step/ObjCopy.zig", // 8154 - //"../src/codegen/aarch64.zig", // 8215 - // "../lib/std/heap/PageAllocator.zig", // 8217 - //"../lib/compiler_rt/log.zig", // 8304 - //"../lib/compiler/aro/aro/Builtins/TypeDescription.zig", // 8317 - // "../lib/std/log.zig", // 8342 - // "../lib/std/hash/wyhash.zig", // 8367 - //"../src/libs/libunwind.zig", // 8392 - //"../lib/compiler_rt/mulf3.zig", // 8398 - //"../lib/std/zig/system/NativePaths.zig", // 8409 - // "../lib/std/os/linux/seccomp.zig", // 8427 - //"../lib/compiler_rt/sqrt.zig", // 8445 - // "../lib/std/os/windows/sublang.zig", // 8449 - // "../lib/std/crypto/pbkdf2.zig", // 8451 - //"../lib/init/build.zig", // 8477 - //"../lib/std/debug/Coverage.zig", // 8486 -- zig compile error - // "../lib/std/crypto/25519/curve25519.zig", // 8492 - // "../lib/std/os/uefi/protocol/udp6.zig", // 8567 - //"../lib/compiler_rt/divsf3.zig", // 8574 - //"../lib/compiler_rt/udivmodsi4_test.zig", // 8599 - //"../lib/docs/wasm/Decl.zig", // 8646 - // "../lib/std/crypto/25519/x25519.zig", // 8666 - //"../lib/compiler_rt/divxf3.zig", // 8669 - // "../lib/std/zig/c_builtins.zig", // 8713 - //"../lib/compiler_rt/sincos.zig", // 8779 - // "../lib/std/math/log1p.zig", // 8872 - //"../lib/compiler_rt/log2.zig", // 8927 - //"../src/arch/riscv64/bits.zig", // 8939 - // "../lib/std/crypto/aes.zig", // 8993 - //"../src/arch/riscv64/Emit.zig", // 9004 - // "../lib/std/Thread/ResetEvent.zig", // 9112 - // "../lib/std/math/pow.zig", // 9113 - //"../src/link/Elf/Archive.zig", // 9162 - //"../lib/std/zig/Zoir.zig", // 9166 - // "../lib/std/crypto/Sha1.zig", // 9321 - //"../lib/compiler_rt/divdf3.zig", // 9366 - //"../lib/std/fmt/parse_float/parse.zig", // 9426 - //"../lib/build-web/time_report.zig", // 9478 - //"../lib/compiler_rt/log10.zig", // 9499 - //"../lib/compiler_rt/stack_probe.zig", // 9539 - // "../lib/std/Thread/Pool.zig", // 9540 - // "../lib/std/crypto/ascon.zig", // 9666 - //"../src/dev.zig", // 9748 - // "../lib/std/crypto/md5.zig", // 9751 - //"../lib/compiler_rt/negsi2_test.zig", // 9775 - //"../lib/std/zig/LibCDirs.zig", // 9786 - // "../lib/std/os/uefi/protocol/managed_network.zig", // 9851 - // "../lib/std/os/uefi/protocol/simple_text_output.zig", // 9857 - //"../lib/std/c/solaris.zig", // 9878 -- zig compile error - //"../lib/docs/wasm/markdown/renderer.zig", // 9906 - //"../lib/compiler_rt/divtf3.zig", // 9925 - //"../src/codegen/spirv/Section.zig", // 9939 - // "../lib/std/hash/murmur.zig", // 9977 - // "../lib/std/debug/Dwarf/call_frame.zig", // 10007 - // "../lib/std/os/uefi/status.zig", // 10107 - //"../src/link/SpirV.zig", // 10121 - //"../src/link/MachO/Archive.zig", // 10152 - // "../lib/std/Thread/Mutex.zig", // 10156 - // "../lib/std/os.zig", // 10310 - //"../lib/compiler_rt/truncf_test.zig", // 10326 - //"../lib/std/Build/abi.zig", // 10407 - // "../lib/std/crypto/timing_safe.zig", // 10441 - // "../lib/std/os/plan9.zig", // 10460 - // "../lib/std/heap/WasmAllocator.zig", // 10472 - // "../lib/std/math/atan2.zig", // 10553 - // "../lib/std/os/linux/mips64.zig", // 10635 - //"../lib/compiler/aro/aro/Driver/Distro.zig", // 10646 - //"../lib/compiler_rt/ctzsi2_test.zig", // 10647 - //"../lib/compiler_rt/ffssi2_test.zig", // 10652 - //"../src/link/Elf/Merge.zig", // 10653 - //"../lib/compiler/aro/aro/tracy.zig", // 10664 - //"../src/link/MachO/load_commands.zig", // 10716 - // "../lib/std/os/uefi/tables.zig", // 10741 - //"../src/link/Elf/file.zig", // 10816 - // "../lib/std/os/linux/sparc64.zig", // 10847 - //"../lib/compiler_rt/clzsi2_test.zig", // 10892 - // "../lib/std/SemanticVersion.zig", // 10911 - //"../lib/compiler_rt/common.zig", // 10957 - //"../lib/compiler_rt.zig", // 11083 - // "../lib/std/pie.zig", // 11147 - //"../lib/compiler_rt/arm.zig", // 11159 - // "../lib/std/tz.zig", // 11173 - // "../lib/std/os/linux/mips.zig", // 11254 - //"../lib/std/c/freebsd.zig", // 11274 -- zig compile error - // "../lib/std/os/linux/powerpc64.zig", // 11367 - // "../lib/std/os/linux/powerpc.zig", // 11375 - // "../lib/std/Thread/RwLock.zig", // 11411 - // "../lib/std/math/gamma.zig", // 11487 - // "../lib/std/math/expm1.zig", // 11499 - //"../src/tracy.zig", // 11560 - //"../lib/compiler_rt/fma.zig", // 11575 - // "../lib/std/time.zig", // 11575 - // "../lib/std/crypto/codecs/asn1.zig", // 11649 - //"../lib/compiler_rt/exp.zig", // 11677 - //"../lib/compiler_rt/trig.zig", // 11743 - // "../lib/std/compress/lzma/decode.zig", // 11871 - //"../lib/std/compress/flate/Compress.zig", // 11928 -- zig compile error - // "../lib/std/math/float.zig", // 12048 - // "../lib/std/os/windows/ntdll.zig", // 12119 - //"../lib/compiler/resinator/bmp.zig", // 12131 - //"../lib/compiler/aro/aro/SymbolStack.zig", // 12163 - //"../lib/std/zig/system/windows.zig", // 12217 - //"../lib/compiler_rt/fmod.zig", // 12218 - // "../lib/std/valgrind.zig", // 12292 - // "../lib/std/sort/pdq.zig", // 12404 - // "../lib/std/hash/cityhash.zig", // 12412 - //"../lib/std/crypto/Certificate/Bundle.zig", // 12470 - //"../lib/compiler_rt/emutls.zig", // 12571 - // "../lib/std/crypto/pcurves/common.zig", // 12650 - //"../src/codegen/llvm/bindings.zig", // 12672 - //"../src/arch/riscv64/abi.zig", // 12744 - //"../lib/compiler/resinator/comments.zig", // 12784 - //"../src/arch/sparc64/Mir.zig", // 12850 - //"../src/link/LdScript.zig", // 12864 - //"../src/link/tapi/yaml/test.zig", // 12882 - //"../src/link/MachO/file.zig", // 12937 - // "../lib/std/http/HeadParser.zig", // 13015 - //"../lib/compiler/aro/backend/Object/Elf.zig", // 13050 - //"../src/link/tapi/Tokenizer.zig", // 13096 - // "../lib/std/os/linux/x86.zig", // 13117 - //"../src/Builtin.zig", // 13136 - //"../lib/std/Build/Step/WriteFile.zig", // 13184 - //"../lib/std/fmt/parse_float.zig", // 13189 - //"../lib/compiler/resinator/rc.zig", // 13194 - // "../lib/std/os/uefi/protocol/ip6.zig", // 13201 - //"../src/link/MachO/CodeSignature.zig", // 13229 - //"../lib/compiler/resinator/ico.zig", // 13329 - //"../src/fmt.zig", // 13376 - //"../lib/docs/wasm/html_render.zig", // 13394 - // "../lib/std/os/uefi/protocol/file.zig", // 13432 - //"../src/link/MachO/Symbol.zig", // 13475 - //"../src/link/MachO/Dwarf.zig", // 13477 - // "../lib/std/os/linux/x86_64.zig", // 13489 - // "../lib/std/compress/flate/Token.zig", // 13531 - // "../lib/std/heap/arena_allocator.zig", // 13560 - //"../lib/std/Io/Reader/test.zig", // 13609 - //"../src/link/Queue.zig", // 13648 - // "../lib/std/crypto.zig", // 13676 - //"../lib/std/os/windows/test.zig", // 13680 - //"../lib/std/c/openbsd.zig", // 13681 -- zig compile error - //"../lib/compiler/aro/aro/text_literal.zig", // 13700 - //"../lib/std/json/dynamic_test.zig", // 13800 - // "../lib/std/crypto/phc_encoding.zig", // 13838 - // "../lib/std/pdb.zig", // 13947 - //"../src/codegen/aarch64/Mir.zig", // 13970 - //"../lib/std/net/test.zig", // 14009 - // "../lib/std/zig/string_literal.zig", // 14323 - // "../lib/std/Io/DeprecatedReader.zig", // 14469 - // "../lib/std/crypto/25519/field.zig", // 14574 - //"../lib/std/Random/test.zig", // 14591 - // "../lib/std/hash/auto_hash.zig", // 14624 - //"../lib/compiler_rt/clzdi2_test.zig", // 14672 - //"../lib/compiler_rt/ctzdi2_test.zig", // 14672 - //"../lib/compiler_rt/ffsdi2_test.zig", // 14677 - //"../lib/std/os/linux/test.zig", // 14753 - //"../lib/compiler/aro/aro/Builtins.zig", // 14813 - //"../lib/std/zig/system/arm.zig", // 15091 - //"../lib/std/zig/system/linux.zig", // 15180 - // "../lib/std/crypto/keccak_p.zig", // 15303 - // "../lib/std/crypto/aes_ocb.zig", // 15331 - //"../lib/build-web/fuzz.zig", // 15497 - //"../lib/std/c/haiku.zig", // 15535 -- zig compile error - //"../lib/std/tar/test.zig", // 15644 - //"../lib/compiler/test_runner.zig", // 15678 - // "../lib/std/os/uefi/protocol/simple_network.zig", // 15978 - // "../lib/std/ascii.zig", // 16059 - // "../lib/std/os/wasi.zig", // 16108 - //"../src/link/MachO/dyld_info/Trie.zig", // 16127 - // "../lib/std/crypto/pcurves/p256.zig", // 16174 - //"../src/link/MachO/DebugSymbols.zig", // 16225 - // "../lib/std/Target/mips.zig", // 16348 - // "../lib/std/crypto/pcurves/p384.zig", // 16370 - //"../lib/std/zig/system/darwin/macos.zig", // 16495 - // "../lib/std/Target/nvptx.zig", // 16613 - //"../lib/compiler/std-docs.zig", // 16860 - //"../src/libs/libtsan.zig", // 16953 - //"../lib/std/tar/Writer.zig", // 17117 -- sema mismatch - //"../lib/std/hash/benchmark.zig", // 17129 - //"../lib/std/Build/Fuzz.zig", // 17168 - //"../src/IncrementalDebugServer.zig", // 17196 - //"../lib/compiler/reduce.zig", // 17382 - //"../lib/compiler/aro/aro/Toolchain.zig", // 17417 - //"../src/link/Elf/Symbol.zig", // 17477 - //"../src/link/Elf/relocatable.zig", // 17518 - // "../lib/std/debug/Dwarf/abi.zig", // 17609 - // "../lib/std/Random.zig", // 17628 - // "../lib/std/static_string_map.zig", // 17640 - //"../src/link/tapi/yaml.zig", // 17649 - // "../lib/std/wasm.zig", // 17661 - //"../lib/std/mem/Allocator.zig", // 17806 -- zig compile error - //"../lib/std/zig/llvm/bitcode_writer.zig", // 17956 - // "../lib/std/crypto/codecs/base64_hex_ct.zig", // 17997 - // "../lib/std/Target/hexagon.zig", // 18058 - //"../src/link/MachO/eh_frame.zig", // 18174 - //"../lib/compiler/aro/aro/toolchains/Linux.zig", // 18613 - // "../lib/std/crypto/siphash.zig", // 18629 - // "../lib/std/leb128.zig", // 18649 - // "../lib/std/os/linux/tls.zig", // 18676 - //"../src/link/SpirV/BinaryModule.zig", // 18821 - // "../lib/std/compress/flate/HuffmanEncoder.zig", // 18914 - //"../src/print_value.zig", // 18924 - //"../src/arch/x86_64/Disassembler.zig", // 18943 - // "../lib/std/os/uefi/tables/runtime_services.zig", // 18947 - //"../src/Air/types_resolved.zig", // 19079 - // "../lib/std/math/nextafter.zig", // 19209 - //"../src/link/Elf/LinkerDefined.zig", // 19221 - // "../lib/std/os/windows/kernel32.zig", // 19302 - // "../lib/std/atomic.zig", // 19425 - //"../src/link/Elf/SharedObject.zig", // 19724 - // "../lib/std/os/linux/io_uring_sqe.zig", // 19909 - //"../lib/std/zig/llvm/BitcodeReader.zig", // 19941 - // "../lib/std/hash/crc.zig", // 19972 - //"../src/Package/Module.zig", // 20066 - //"../src/link/MachO/dyld_info/Rebase.zig", // 20078 - // "../lib/std/os/windows/nls.zig", // 20117 - //"../src/crash_report.zig", // 20163 - // "../lib/std/segmented_list.zig", // 20351 - //"../src/link/Elf/eh_frame.zig", // 20471 - // "../lib/std/crypto/ghash_polyval.zig", // 20494 - //"../lib/std/compress/flate/BlockWriter.zig", // 20508 -- sema mismatch - // "../lib/std/crypto/pcurves/secp256k1.zig", // 20520 - //"../lib/std/crypto/benchmark.zig", // 20565 - //"../lib/compiler_rt/rem_pio2_large.zig", // 20581 - //"../lib/std/json/scanner_test.zig", // 20813 - //"../lib/compiler_rt/exp2.zig", // 20924 - //"../src/Compilation/Config.zig", // 21269 - // "../lib/std/Target/sparc.zig", // 21324 - //"../src/libs/libcxx.zig", // 21365 - // "../lib/std/priority_queue.zig", // 21416 - //"../lib/std/zig/BuiltinFn.zig", // 21416 - //"../src/arch/riscv64/Lower.zig", // 21556 - //"../lib/compiler/aro/aro/Diagnostics.zig", // 21652 - //"../lib/compiler/resinator/code_pages.zig", // 21825 - //"../lib/std/debug/Pdb.zig", // 22200 -- zig compile error - // "../lib/std/crypto/aes/aesni.zig", // 22223 - //"../lib/ubsan_rt.zig", // 22376 - // "../lib/std/crypto/aes/armcrypto.zig", // 22711 - //"../lib/std/Build/Watch/FsEvents.zig", // 22825 - //"../lib/compiler/aro/backend/Ir.zig", // 22921 - //"../src/link/tapi/parse.zig", // 23143 - // "../lib/std/simd.zig", // 23280 - // "../lib/std/Thread/Condition.zig", // 23329 - //"../lib/std/json/JSONTestSuite_test.zig", // 23341 - //"../lib/compiler/aro/aro/target.zig", // 23389 - //"../src/link/tapi/parse/test.zig", // 23445 - //"../lib/compiler_rt/powiXf2_test.zig", // 23516 - //"../lib/std/Build/Step/Options.zig", // 23856 - //"../lib/std/os/linux/bpf/helpers.zig", // 24293 - //"../lib/compiler_rt/negdi2_test.zig", // 24386 - //"../src/link/MachO/synthetic.zig", // 24415 - //"../lib/compiler_rt/clzti2_test.zig", // 24481 - //"../lib/compiler_rt/ctzti2_test.zig", // 24481 - //"../lib/compiler_rt/ffsti2_test.zig", // 24486 - // "../lib/std/base64.zig", // 24490 - // "../lib/std/treap.zig", // 24524 - //"../src/arch/x86_64/abi.zig", // 24784 - //"../lib/std/zig/target.zig", // 25071 - //"../src/Air/Liveness/Verify.zig", // 25460 - // "../lib/std/crypto/tls.zig", // 25575 - //"../src/Package/Manifest.zig", // 25616 - // "../lib/std/dynamic_library.zig", // 25874 - // "../lib/std/crypto/scrypt.zig", // 25878 - //"../src/mutable_value.zig", // 25931 - // "../lib/std/crypto/25519/edwards25519.zig", // 25932 - //"../lib/fuzzer.zig", // 26234 - //"../lib/std/Build/Module.zig", // 26376 - //"../lib/compiler_rt/atomics.zig", // 26388 - // "../lib/std/zip.zig", // 26592 - //"../lib/std/zig/system/x86.zig", // 26641 - //"../src/arch/x86_64/Lower.zig", // 26685 - //"../lib/compiler/aro/backend/Interner.zig", // 26780 - //"../src/link/MachO/UnwindInfo.zig", // 27185 - //"../src/arch/sparc64/Emit.zig", // 27254 - // "../lib/std/crypto/salsa20.zig", // 27260 - //"../lib/compiler_rt/shift_test.zig", // 27305 - //"../src/link/MachO/dyld_info/bind.zig", // 27479 - //"../lib/compiler_rt/int.zig", // 27737 - //"../lib/std/start.zig", // 28071 - //"../src/register_manager.zig", // 28244 - //"../src/libs/netbsd.zig", // 28274 - //"../lib/std/zig/c_translation.zig", // 28363 - //"../src/target.zig", // 28514 - //"../lib/compiler/aro/aro/Driver/GCCDetector.zig", // 28842 - // "../lib/std/crypto/argon2.zig", // 28906 - // "../lib/std/fmt/parse_float/decimal.zig", // 29140 - // "../lib/std/crypto/blake2.zig", // 29319 - //"../src/link/MachO/relocatable.zig", // 29392 - //"../lib/std/Target/Query.zig", // 29955 -- zig compile error - //"../src/arch/x86_64/bits.zig", // 30088 - //"../src/link/C.zig", // 30170 - // "../lib/std/Target/s390x.zig", // 30256 - //"../lib/compiler/aro/aro/char_info.zig", // 30742 - //"../lib/compiler/aro/aro/record_layout.zig", // 30742 - //"../lib/std/Build/WebServer.zig", // 30754 - //"../lib/compiler/resinator/windows1252.zig", // 31322 - //"../lib/std/http/Server.zig", // 31360 - // "../lib/std/crypto/25519/ed25519.zig", // 31401 - //"../lib/std/json/static_test.zig", // 31448 - // "../lib/std/Uri.zig", // 31490 - //"../lib/compiler/objcopy.zig", // 31546 - //"../src/Sema/bitcast.zig", // 31592 - //"../src/arch/wasm/Mir.zig", // 31654 - //"../lib/docs/wasm/markdown.zig", // 31700 - //"../lib/compiler/reduce/Walk.zig", // 32099 - //"../lib/std/zon/Serializer.zig", // 32288 -- sema mismatch - //"../lib/std/hash/crc/test.zig", // 32551 - //"../src/link/SpirV/lower_invocation_globals.zig", // 32560 - //"../lib/std/zig/ErrorBundle.zig", // 32614 - // "../lib/std/crypto/aes/soft.zig", // 33347 - //"../src/arch/riscv64/encoding.zig", // 33360 - //"../lib/docs/wasm/main.zig", // 33691 - // "../lib/std/crypto/25519/scalar.zig", // 33703 - // "../lib/std/priority_dequeue.zig", // 33889 - // "../lib/std/json/static.zig", // 33944 - // "../lib/std/os/emscripten.zig", // 34093 - //"../src/link/MachO/Dylib.zig", // 34197 - //"../src/codegen/spirv/Module.zig", // 34321 - // "../lib/std/fs.zig", // 34417 - // "../lib/std/Io.zig", // 35271 - //"../src/link/MachO/InternalObject.zig", // 35351 - //"../src/arch/x86_64/Encoding.zig", // 35382 - // "../lib/std/crypto/sha3.zig", // 35726 - // "../lib/std/heap.zig", // 35783 - //"../lib/std/zig/ZonGen.zig", // 36096 - //"../lib/std/zig/LibCInstallation.zig", // 36100 - //"../lib/compiler/resinator/lang.zig", // 36104 - // "../lib/std/Target/powerpc.zig", // 36467 - //"../src/Sema/LowerZon.zig", // 36593 - // "../lib/std/crypto/sha2.zig", // 36825 - // "../lib/std/zig.zig", // 37103 - // "../lib/std/os/uefi/device_path.zig", // 37311 - //"../lib/std/json/Stringify.zig", // 37319 -- zig compile error - //"../lib/std/crypto/bcrypt.zig", // 37669 -- segfault in C sema - // "../lib/std/Build/Cache/DepTokenizer.zig", // 37958 - // "../lib/std/crypto/ff.zig", // 38465 - //"../lib/compiler/aro/aro/Driver.zig", // 38607 - //"../lib/std/Build/Step.zig", // 38694 -- zig compile error - //"../lib/compiler_rt/int_from_float_test.zig", // 38802 - //"../lib/compiler/aro/aro/Attribute.zig", // 38863 - //"../src/arch/wasm/Emit.zig", // 39086 - // "../lib/std/http.zig", // 39240 - // "../lib/std/sort.zig", // 39596 - // "../lib/std/meta.zig", // 39789 - // "../lib/std/builtin.zig", // 39860 - //"../lib/docs/wasm/Walk.zig", // 40114 - //"../src/Air/print.zig", // 40277 - //"../lib/compiler/aro/aro/Value.zig", // 41195 - //"../src/codegen/spirv/Assembler.zig", // 41296 - //"../lib/compiler/resinator/main.zig", // 41392 - // "../lib/std/crypto/blake3.zig", // 41428 - //"../lib/std/zig/AstRlAnnotate.zig", // 41574 - // "../lib/std/hash/xxhash.zig", // 41799 - //"../lib/std/Build/Step/ConfigHeader.zig", // 41853 - // "../lib/std/Thread/Futex.zig", // 42124 - //"../src/libs/freebsd.zig", // 42329 - // "../lib/std/tar.zig", // 42826 - //"../lib/std/Build/Watch.zig", // 43006 - //"../src/libs/wasi_libc.zig", // 43111 - // "../lib/std/multi_array_list.zig", // 43556 - //"../lib/compiler/resinator/cvtres.zig", // 44109 - //"../lib/std/http/test.zig", // 44719 - //"../src/libs/mingw.zig", // 44852 - //"../src/Sema/comptime_ptr_access.zig", // 44969 - //"../src/link/MachO/Atom.zig", // 45473 - //"../lib/compiler_rt/hexagon.zig", // 45809 - //"../lib/compiler_rt/float_from_int_test.zig", // 45810 - //"../lib/std/zig/WindowsSdk.zig", // 45848 - // "../lib/std/os/linux/bpf.zig", // 46056 - // "../lib/std/zon/stringify.zig", // 46916 - //"../lib/compiler/resinator/ast.zig", // 47075 - // "../lib/std/os/uefi/tables/boot_services.zig", // 47589 - // "../lib/std/crypto/aegis.zig", // 47614 - //"../lib/std/compress/flate/Decompress.zig", // 47768 -- zig compile error - // "../lib/std/fmt/parse_float/convert_eisel_lemire.zig", // 48543 - //"../lib/compiler/resinator/lex.zig", // 49189 - //"../lib/std/posix/test.zig", // 49411 - //"../lib/compiler/resinator/res.zig", // 49608 - //"../lib/compiler/resinator/literals.zig", // 49670 - //"../lib/compiler/aro/aro/Tree.zig", // 49828 - //"../src/arch/x86_64/Emit.zig", // 49914 - // "../lib/std/testing.zig", // 50117 - //"../lib/std/c/darwin.zig", // 50235 -- zig compile error - //"../lib/compiler/resinator/source_mapping.zig", // 50401 - // "../lib/std/crypto/Certificate.zig", // 50895 - //"../lib/std/zig/llvm/ir.zig", // 50924 - // "../lib/std/sort/block.zig", // 51714 - // "../lib/std/coff.zig", // 51742 - //"../lib/compiler/aro/aro/CodeGen.zig", // 51887 - // "../lib/std/crypto/chacha20.zig", // 51909 - //"../src/libs/glibc.zig", // 51984 - //"../src/codegen.zig", // 53457 - //"../src/arch/sparc64/bits.zig", // 55909 - // "../lib/std/enums.zig", // 57857 - // "../lib/std/zig/system.zig", // 58192 - // "../lib/std/fmt.zig", // 58752 - // "../lib/std/builtin/assembly.zig", // 59140 - //"../lib/std/Build/Cache.zig", // 59803 -- zig compile error - // "../lib/std/heap/debug_allocator.zig", // 59918 - // "../lib/std/Progress.zig", // 60600 - //"../lib/std/Thread.zig", // 60783 -- zig compile error - //"../lib/docs/wasm/markdown/Parser.zig", // 61116 - //"../src/link/Elf/synthetic_sections.zig", // 61138 - //"../lib/compiler/aro/aro/char_info/identifier_tables.zig", // 61510 - //"../lib/compiler/resinator/errors.zig", // 62242 - //"../src/link/Elf/Object.zig", // 62684 - // "../lib/std/zig/tokenizer.zig", // 63472 - // "../lib/std/crypto/ml_kem.zig", // 65291 - //"../lib/std/elf.zig", // 65720 -- zig compile error - //"../lib/compiler/build_runner.zig", // 66312 - //"../lib/compiler/aro/aro/Compilation.zig", // 66441 - //"../src/link/MachO/ZigObject.zig", // 67468 - //"../lib/compiler/aro/aro/Diagnostics/messages.zig", // 67958 - //"../lib/std/crypto/pcurves/p256/p256_64.zig", // 67958 - //"../src/link/Lld.zig", // 68491 - //"../lib/std/Io/Reader.zig", // 68505 -- zig compile error - //"../lib/compiler_rt/negti2_test.zig", // 68520 - // "../lib/std/bit_set.zig", // 69019 - // "../lib/std/debug.zig", // 69506 - //"../src/codegen/aarch64/Disassemble.zig", // 69853 - //"../lib/compiler/aro/aro/Tokenizer.zig", // 70343 - //"../src/clang.zig", // 70383 - //"../src/arch/x86_64/Mir.zig", // 70583 - //"../lib/std/http/Client.zig", // 70726 -- zig compile error - // "../lib/std/macho.zig", // 70826 - //"../src/Package/Fetch/git.zig", // 71049 - // "../lib/std/Target/avr.zig", // 71492 - // "../lib/std/debug/Dwarf/expression.zig", // 71838 - //"../lib/std/process/Child.zig", // 72495 -- C sema crash - // "../lib/std/json/Scanner.zig", // 72868 - //"../lib/std/Build/Step/Run.zig", // 73144 - // "../lib/std/crypto/pcurves/secp256k1/secp256k1_64.zig", // 73280 - // "../lib/std/math.zig", // 74776 - //"../src/link/Wasm/Object.zig", // 75666 - // "../lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig", // 75859 - //"../lib/compiler/aro_translate_c.zig", // 76078 - // "../lib/std/crypto/pcurves/p256/p256_scalar_64.zig", // 76136 - //"../src/Air/Liveness.zig", // 76723 - // "../lib/std/os/windows/ws2_32.zig", // 77480 - // "../lib/std/Target/csky.zig", // 77604 - //"../src/link/Elf/Atom.zig", // 77619 - // "../lib/std/fs/path.zig", // 78108 - //"../lib/compiler/aro/aro/Attribute/names.zig", // 78194 - //"../lib/std/compress/zstd/Decompress.zig", // 78531 -- sema mismatch - // "../lib/std/Target/arm.zig", // 79071 - //"../lib/compiler_rt/aarch64_outline_atomics.zig", // 79084 - // "../lib/std/process.zig", // 79140 - // "../lib/std/hash_map.zig", // 80684 - //"../src/libs/musl.zig", // 81203 - //"../lib/std/crypto/tls/Client.zig", // 81614 -- zig compile error - //"../lib/std/fs/File.zig", // 85774 -- zig compile error - // "../lib/std/unicode.zig", // 85999 - //"../lib/std/fs/test.zig", // 86286 - //"../src/Air.zig", // 86645 - //"../lib/std/Build/Step/Compile.zig", // 87950 - // "../lib/std/net.zig", // 88647 - //"../src/Sema/arith.zig", // 89680 - // "../lib/std/Target/riscv.zig", // 90023 - //"../lib/std/debug/SelfInfo.zig", // 90918 -- zig compile error - //"../src/link.zig", // 91225 - //"../lib/compiler/resinator/parse.zig", // 91390 - //"../src/link/Wasm/Flush.zig", // 93234 - // "../lib/std/fmt/float.zig", // 94944 - // "../lib/std/array_list.zig", // 95685 - //"../lib/std/debug/Dwarf.zig", // 95718 -- zig compile error - //"../src/Package/Fetch.zig", // 95719 - //"../lib/compiler/resinator/cli.zig", // 97797 - //"../lib/std/Build.zig", // 100909 -- zig compile error - //"../src/arch/x86_64/encoder.zig", // 101113 - //"../src/link/Elf/ZigObject.zig", // 101594 - //"../lib/compiler/aro/aro/Type.zig", // 102998 - //"../lib/compiler/aro_translate_c/ast.zig", // 104528 - // "../lib/std/Target/amdgcn.zig", // 104612 - // "../lib/std/Target/aarch64.zig", // 106498 - //"../lib/std/Target.zig", // 107284 -- zig compile error - //"../lib/std/Io/Writer.zig", // 107573 -- zig compile error - //"../lib/std/fs/Dir.zig", // 115037 -- zig compile error - //"../src/print_zir.zig", // 116226 - // "../lib/std/zon/parse.zig", // 117417 - //"../lib/std/Build/Step/CheckObject.zig", // 117426 - //"../src/link/Coff.zig", // 119285 - // "../lib/std/array_hash_map.zig", // 119750 - //"../src/link/MachO/Object.zig", // 121867 - // "../lib/std/os/windows/win32error.zig", // 130227 - //"../src/Air/Legalize.zig", // 133999 - // "../lib/std/crypto/pcurves/p384/p384_64.zig", // 134511 - //"../lib/std/zig/Parse.zig", // 135650 -- zig compile error - // "../lib/std/crypto/pcurves/p384/p384_scalar_64.zig", // 137291 - //"../src/codegen/c/Type.zig", // 138477 - // "../lib/std/Target/x86.zig", // 139090 - //"../src/Value.zig", // 140810 - //"../lib/std/zig/Ast/Render.zig", // 142067 -- zig compile error - //"../lib/std/zig/Ast.zig", // 148759 -- zig compile error - //"../lib/std/math/big/int_test.zig", // 150531 - //"../lib/compiler/aro/aro/Preprocessor.zig", // 150686 - //"../lib/std/zig/parser_test.zig", // 155995 - //"../src/link/Elf.zig", // 159351 - //"../src/Type.zig", // 159449 - //"../src/link/Wasm.zig", // 166754 - // "../lib/std/os/linux/IoUring.zig", // 173427 - //"../lib/compiler/resinator/compile.zig", // 173912 - // "../lib/std/math/big/int.zig", // 175949 - //"../src/clang_options_data.zig", // 177121 - // "../lib/std/os/linux/syscalls.zig", // 183126 - //"../src/codegen/aarch64/Assemble.zig", // 183821 - // "../lib/std/mem.zig", // 185101 - //"../src/Zcu/PerThread.zig", // 185477 - //"../src/arch/sparc64/CodeGen.zig", // 192459 - //"../src/link/MachO.zig", // 195880 - // "../lib/std/zig/Zir.zig", // 204779 - //"../lib/std/os/windows.zig", // 207257 -- zig compile error - //"../src/Zcu.zig", // 210299 - //"../lib/std/os/windows/ntstatus.zig", // 237477 - //"../src/codegen/spirv/CodeGen.zig", // 248848 - //"../src/translate_c.zig", // 269517 - //"../src/link/Dwarf.zig", // 275120 - //"../lib/std/os/linux.zig", // 284102 - // "../lib/std/posix.zig", // 290949 - //"../src/arch/wasm/CodeGen.zig", // 301068 - //"../src/arch/riscv64/CodeGen.zig", // 326036 - //"../src/Compilation.zig", // 341489 - //"../src/codegen/c.zig", // 345474 - //"../lib/compiler/aro/aro/Parser.zig", // 347693 - //"../src/main.zig", // 356446 - //"../lib/std/c.zig", // 362358 - //"../lib/std/crypto/ecdsa.zig", // 395201 - //"../src/InternPool.zig", // 511219 - //"../lib/std/zig/AstGen.zig", // 568292 - //"../lib/std/zig/llvm/Builder.zig", // 592181 - //"../src/codegen/llvm.zig", // 598247 - //"../src/codegen/aarch64/Select.zig", // 653013 - //"../src/codegen/aarch64/encoding.zig", // 666794 - //"../src/codegen/spirv/spec.zig", // 776382 - //"../lib/compiler/aro/aro/Builtins/Builtin.zig", // 1224944 - //"../src/Sema.zig", // 1605480 - //"../lib/compiler_rt/udivmoddi4_test.zig", // 1895062 - //"../lib/compiler_rt/udivmodti4_test.zig", // 10249535 - //"../src/arch/x86_64/CodeGen.zig", // 11086406 -};