ziglang/zig
263
5.9k
Fork
You've already forked zig
760

compiler: rework type resolution #31403

Merged
mlugg merged 79 commits from lets-get-typing into master 2026年03月10日 22:06:09 +01:00
Owner
Copy link

This branch implements a major rework of the Zig compiler's type resolution system.

Background

The logic for type resolution in the Zig compiler has, over time, built up a collection of hacks which work to solve specific use cases. Unfortunately, the approaches used are deeply flawed and lead to lots of bugs. The logic as it exists today simply cannot be formalized into a coherent language specification. Moreover, it is not compatible with incremental compilation or parallel semantic analysis, both of which are of course things we want to introduce (though incremental compilation of course exists today, type resolution is one of the main things which can trigger bugs in it).

This branch aims to sacrifice a small number of nice language properties to make type resolution significantly more straightforward to specify and implement.

The Bad Stuff

Let's get this out of the way first: what are the aforementioned sacrifices? Don't worry---there are only a handful.

The first is that pointers to comptime-only types are no longer themselves considered comptime-only. For instance, though comptime_int is a comptime-only type, *comptime_int is not, and neither is []comptime_int. This may seem confusing at first---the easiest way to understand it is to consider function pointers. The type *const fn () void is a runtime type. However, you are not allowed to dereference it at runtime, because the element type (the function body type fn () void) is comptime-only. So these pointers can exist at runtime, but may only be dereferenced at compile-time. This makes them more-or-less useless at runtime---but there's actually an exception to that! Suppose you have a []const std.builtin.Type.StructField, and you want to pass the name of each field to runtime code somehow. Previously, you would have done this by constructing a separate []const []const u8. However, now, you can pass the []const std.builtin.Type.StructField directly to a runtime function. Naturally, this function cannot load a StructField from this slice at runtime. However, what it can do is load the name field, because it has a runtime type! This didn't require any new logic in the compiler backends (Jacob and Andrew will know why :P), it just popped out as a natural consequence of this change. I'm not claiming this change is necessarily a good thing (I think it's fairly neutral really), but it is interesting to see that it simplifies certain use cases.

The second change in this area is to do with pointer alignment. Previously, *u8 and *align(1) u8 were considered by Zig to be literally the same type; they would compare equal, and *u8 was considered the canonical spelling (it's what the compiler would print). This branch changes this: those two types are no longer considered equivalent. Crucially, the two types can still be used interchangably. They coerce to one another, even though pointers (what the compiler calls "in-memory coercions"), and in almost every case there is no need to care which one you have (for instance, when migrating the standard library in this branch, I did not need to think about that difference ever). You could think of this difference as being like the difference between u32 and c_uint: technically they are different types, but (assuming your target has 32-bit int) they act identically for all intents and purposes, and it doesn't technically matter which one you pick.

Lastly, this branch will introduce some cases which are now dependency loops when they previously were not. There aren't many of these, but notably, std.MultiArrayList did encounter one of them: I ended up needing to change the type of the bytes field on MultiArrayList to not have the correct align annotation (though this wasn't a big deal since that field is always accessed through a function call anyway). However, I believe that, if nothing else, it's now much more obvious why a dependency loop exists---the new compile errors for them (more about that later) give a good amount of detail, and in my experience there hasn't been any example which I thought should "obviously" work which actually triggered a dependency loop. In other words, I think the new system is easier for users to intuit, and always gives sensible-looking results.

The Good Stuff

Lazy field analysis

A problem we've noticed since introducing std.Io is that if a type is used as a namespace, its fields will be analyzed anyway. For instance, using std.Io.Writer in any way pulls in the vtable of std.Io. Some cases of this could even result in unnecessary codegen, which can bloat binaries. This decision was made around 2 years back, but it's pretty clear now that it's not ideal, so #30842 was opened to change this design.

This PR achieves that. Container types---meaning structs (including files), unions, enums, and opaques---will now, broadly speaking, only be "resolved" when something about how that type "looks", such as its size or the type of one of its fields, is required. This means that not only can you use types as namespaces without referencing them, but you can even use pointers *T without needing T to be resolved (until you dereference that pointer or something, of course).

Resolves: #30842

Dependency loop compile errors

When you do trigger dependency loops, the compile error is now much more useful. "Dependency loop" is a general term here: it applies not only to types, but to dependency loops between declarations and between functions (when resolving inferred error sets). In the past, hitting any such dependency loop would emit a very unhelpful error message saying "dependency loop detected" or "struct depends on itself" at a place vaguely near one of the components of the dependency loop. It was essentially impossible to actually figure out where the loop was coming from and how to solve it.

Now, the error actually explains what's going on! Here are a couple of straightforward examples:

// repro.zigconstx=x+1;comptime{_=x;}constS=struct{other:S};comptime{_=@as(S,undefined);}constA=struct{b:B};constB=struct{a:A};comptime{_=@as(A,undefined);}
$ zig build-obj repro.zig
error: dependency loop with length 2
 repro.zig:13:23: note: type 'repro.A' depends on type 'repro.B' for field declared here
 const A = struct { b: B };
 ^
 repro.zig:14:23: note: type 'repro.B' depends on type 'repro.A' for field declared here
 const B = struct { a: A };
 ^
 note: eliminate any one of these dependencies to break the loop
repro.zig:8:27: error: type 'repro.S' depends on itself for field declared here
const S = struct { other: S };
 ^
repro.zig:3:11: error: value of declaration 'repro.x' depends on itself here
const x = x + 1;
 ^

...and here's a more complicated example:

// repro.zigconsta:@Int(.unsigned,b.n)=123;constb:S=.{};constS=struct{n:u32=err_set_len,};consterr_set_len=@typeInfo(@typeInfo(@typeInfo(@TypeOf(myFn)).@"fn".return_type.?).error_union.error_set).error_set.len;fnmyFn()!void{if(@TypeOf(a)==u0)returnerror.ThereHaveBeenExplosions;}comptime{_=a;}
$ ./zig-native-safe/bin/zig build-obj repro.zig
error: dependency loop with length 6
 repro.zig:3:27: note: type of declaration 'repro.a' uses value of declaration 'repro.b' here
 const a: @Int(.unsigned, b.n) = 123;
 ~^~
 repro.zig:5:15: note: value of declaration 'repro.b' uses default field values of 'repro.S' here
 const b: S = .{};
 ~^~
 repro.zig:8:14: note: default field value of 'repro.S' uses value of declaration 'repro.err_set_len' here
 n: u32 = err_set_len,
 ^~~~~~~~~~~
 repro.zig:11:21: note: value of declaration 'repro.err_set_len' uses inferred error set of function 'repro.myFn' here
 const err_set_len = @typeInfo(@typeInfo(@typeInfo(@TypeOf(myFn)).@"fn".return_type.?).error_union.error_set).error_set.len;
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 repro.zig:14:17: note: function 'repro.myFn' uses value of declaration 'repro.a' here
 if (@TypeOf(a) == u0) return error.ThereHaveBeenExplosions;
 ^
 repro.zig:3:33: note: value of declaration 'repro.a' uses type of declaration 'repro.a' here
 const a: @Int(.unsigned, b.n) = 123;
 ^~~
 note: eliminate any one of these dependencies to break the loop

Incremental compilation

One of the biggest enhancements made in this branch is to incremental compilation. Reworking type resolution was able to solve some serious bugs in incremental compilation, and in particular, solve over-analysis (where an incremental update does more work than it needs to) pretty much entirely.

The reason for this is because the incremental dependency graph (which is also tied to Zig's semantic analysis model, and so will be partially specified in the langspec) is now acyclic (so is now a DAG) where it previously contained cycles. This is a big deal because acyclic graphs are massively simpler and more efficient to work with (in fact, this property is responsible for most of the type resolution bugs fixed in this branch; making the dependency graph a DAG was in a very real sense the primary purpose of this branch). The compiler no longer has to guess what is best to analyze---it knows.

For instance, when using incremental compilation on the Zig compiler itself, examples which would previously re-analyze almost all of the compiler(!) now only re-analyze one trivial function. This makes incremental compilation significantly faster in many cases.

(削除) EDITOR'S NOTE: uh, actually, I seem to have broken this somehow since I last checked. I'll be sure to investigate and get it fixed before I merge this PR---I'm confident that it won't be hard. (削除ここまで) All fixed now :)

Language simplifications

By designing type resolution to avoid loops in the dependency graph, the language has been hugely simplified under the hood, as reflected by the change in the compiler's line count. For instance, the concept of "lazy values"---which were a common source of bugs and would likely have bloated the langspec quite a bit---has been entirely eliminated; and type resolution (aside from struct default field values) now happens in one phase instead of 4.

Bug fixes

These seem to be fixed on master anyway, but I'm now confident they will continue to work:

Resolves: https://github.com/ziglang/zig/issues/14353
Resolves: https://github.com/ziglang/zig/issues/17550
Resolves: https://github.com/ziglang/zig/issues/19920
Resolves: https://github.com/ziglang/zig/issues/23344

These previously crashed the compiler, and now fail compilation as expected:

Resolves: https://github.com/ziglang/zig/issues/17603
Resolves: https://github.com/ziglang/zig/issues/18346
Resolves: https://github.com/ziglang/zig/issues/20134
Resolves: https://github.com/ziglang/zig/issues/24269

These previously failed with dependency loops (possibly inconsistently), and now (consistently) succeed:

Resolves: https://github.com/ziglang/zig/issues/16932
Resolves: https://github.com/ziglang/zig/issues/17255
Resolves: https://github.com/ziglang/zig/issues/23362
Resolves: https://github.com/ziglang/zig/issues/24604
Resolves: https://github.com/ziglang/zig/issues/24636

These previously failed inconsistently, and now do so consistently:

Resolves: https://github.com/ziglang/zig/issues/17874
Resolves: https://github.com/ziglang/zig/issues/18478
Resolves: https://github.com/ziglang/zig/issues/23400

These previously failed with dependency loops; they still do, but I now consider them "wontfix":

Resolves: https://github.com/ziglang/zig/issues/12325
Resolves: https://github.com/ziglang/zig/issues/18664

Misc. fixes:

Resolves: https://github.com/ziglang/zig/issues/16199
Resolves: https://github.com/ziglang/zig/issues/21222
Resolves: https://github.com/ziglang/zig/issues/22742
Resolves: https://github.com/ziglang/zig/issues/22986
Resolves: https://github.com/ziglang/zig/issues/23222
Resolves: https://github.com/ziglang/zig/issues/24071
Resolves: https://github.com/ziglang/zig/issues/24088
Resolves: https://github.com/ziglang/zig/issues/24882
Resolves: https://github.com/ziglang/zig/issues/25226
Resolves: https://github.com/ziglang/zig/issues/25769
Resolves: https://github.com/ziglang/zig/issues/25771
Resolves: #31013
Resolves: #31080
Resolves: #31350

Misc. Changes

Implemented accepted proposals

  • breaking: disallow pointers in packed struct and packed union types
  • breaking: disallow enum/packed struct/packed union with implicit backing type in extern positions
  • allow explicit backing integer of packed union

Resolves: https://github.com/ziglang/zig/issues/24657
Resolves: https://github.com/ziglang/zig/issues/24714
Resolves: https://github.com/ziglang/zig/issues/25350

Small std.builtin.Type changes

The alignment fields in std.builtin.Type.{Pointer,StructField,UnionField} has been updated to have type ?usize rather than comptime_int. The use of usize over comptime_int is just because it's a more sensible integer type here---what matters is that it's now optional.

  • For pointers, .alignment = null indicates a default-aligned (as opposed to explicitly-aligned) pointer, i.e. *T instead of *align(a) T. This is due to the fact that *T and *align(@alignOf(T)) T are now different types. If you need the actual alignment of the pointer address, you can use ptr_info.alignment orelse @alignOf(ptr_info.child). If you're going to pass the value back into @Pointer because you're just trying to "modify" a pointer type (e.g. []T -> *T), then more often than not you just want to pass ptr_info.alignment straight into std.Type.Pointer.Attributes.@"align"---so, default-alignment in means default-alignment out.
  • For struct and union fields, .alignment = null means the field has no explicit alignment annotation (so, the field is only populated if the field has an explicit align(a) annotation). Previously, this field was populated by the compiler with an "inferred" alignment in that case, but the semantics of this were made ambiguous by extern types, where "actual" alignments may be higher than natural alignments (or, indeed, explicit annotations) would imply due to well-defined field offsets. As a result, it makes more sense to give users the "raw" data here, which can be used however they want. Of course, this change also gives a more natural representation for packed types: their fields don't have alignments in any sense, so we previously set this field to 0 (which always felt hacky), while we can now use null instead.

New semantics for "uninstantiable" types

This branch changes the semantics of "uninstantiable" types (things like noreturn, that is, types which contain no values). I wasn't originally planning to do this here, but matching the semantics of master was pretty difficult because the existing semantics don't make much sense.

What I've implemented is a fairly uncontroversial subset of https://github.com/ziglang/zig/issues/15909. The following types are considered uninstantiable:

  • noreturn
  • union or union(T) where all field types are uninstantiable
  • struct where any field type is uninstantiable
  • [n]T or @Vector(n, T) where T is uninstantiable and n is non-zero

Notably, this does not include enum {} or error {}, because those types raise weird questions regarding in-memory layout (related: https://github.com/ziglang/zig/issues/19855).

extern and packed types are also excluded for now, because they introduce weird inconsistencies. The only specific language rule here is that extern unions and packed unions cannot have zero fields: the fact that all extern and packed types are therefore instantiable just pops out as a natural result of that.

Attempting to coerce undefined to an uninstantiable type will result in a compile error, just like how coercing undefined specifically to noreturn is already a compile error on master.

There aren't many user-facing side effects to this change. One nice one is that the "impossible branch of switch on union is not analyzed" feature, useful when a build option changes something to noreturn to represent an option being compiled out now works in more cases, such as when the union payload is a struct which itself contains the noreturn type:

constenable_foo=false;constFooPtr=if(enable_foo)*struct{}elsenoreturn;constU=union(enum){foo:struct{ctx:FooPtr},bar:struct{something:u32},fndoSomething(u:U)void{switch(u){.foo=>{if(!enable_foo)@compileError("should not be analyzed");// ...},.bar=>{// ...},}}};comptime{_=&U.doSomething;}

LLVM debug information enhancements

I got briefly sidetracked while working on this branch by the debug information emitted by the LLVM backend, specifically with regard to type information---I was updating the backend to work with the new compiler internals and couldn't resist making some enhancements. In no particular order:

  • Error sets are now lowered as enums (or rather as aliases to one enum, anyerror), so error values will appear by name in debuggers rather than as meaningless numbers

  • Unions with zero-bit payloads now actually work

  • All types are now named correctly (so you'll never see weird generated C/C++-style type names)

Removed deprecated ArrayList default values

The default field values in std.ArrayList were deprecated almost a year ago, which is long enough that I can remove them. I originally removed these to solve some dependency loops; those dependency loops wouldn't actually happen on the final version of this branch, but there's no point re-adding the deprecated default values when I already migrated away from them.

If you get compile errors due to this, you probably just need to change .{} to .empty.

Compiler Performance Measurements

I tested compiling Hello World, the standard library tests, Andrew's Tetris demo, and ZLS. All tests were run on 4 different compilers (master ReleaseSafe, this branch ReleaseSafe, master ReleaseFast, and this branch ReleaseFast), and were run both with the self-hosted x86_64 backend and with -fno-emit-bin. I used poop to take these measurements.

Because this branch makes breaking language changes, the standard library is necessarily different between master branch's compilers and this branch's compilers. However, I haven't modified std too significantly in this branch, so I don't expect that to have affected the results much.

Change in peak RSS was usually statistically insignificant. Otherwise, it was slightly better on this branch than on master. If an improvement was seen it was usually around 2%, though two benchmarks saw an improvement of around 7%.

The more interesting number is wall-clock time. Here's a table summarizing the changes in wall-clock time against master branch:

hello world std tests tetris zls
ReleaseSafe x86_64 💩 + 11.9% ± 0.5% - 1.4% ± 1.0% 💩 + 10.4% ± 0.6% 💩 + 24.6% ± 1.2%
ReleaseSafe no-bin - 0.5% ± 0.4% - 6.6% ± 1.0% - 0.2% ± 0.5% - 1.0% ± 0.5%
ReleaseFast x86_64 - 12.7% ± 0.5% - 12.0% ± 6.2% - 12.0% ± 0.5% - 13.5% ± 0.5%
ReleaseFast no-bin - 2.7% ± 0.4% - 8.8% ± 0.7% - 2.6% ± 0.4% - 5.0% ± 0.7%

It seems that ReleaseSafe compilers are usually a bit slower when emitting a binary (at worst 25%, usually around 10%), and are pretty much on-par with -fno-emit-bin; while ReleaseFast compilers are faster across the board, with a typical speed-up of 12% when emitting a binary and ~5% with -fno-emit-bin.

raw poop output
Benchmark 1 (47 runs): zig/master/zig-native-safe/bin/zig build-exe hello.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 427ms ± 5.08ms 416ms ... 438ms 0 ( 0%) 0%
 peak_rss 186MB ± 488KB 185MB ... 187MB 1 ( 2%) 0%
 cpu_cycles 3.43G ± 21.7M 3.39G ... 3.48G 0 ( 0%) 0%
 instructions 6.73G ± 715K 6.73G ... 6.73G 2 ( 4%) 0%
 cache_references 263M ± 1.56M 259M ... 267M 0 ( 0%) 0%
 cache_misses 22.2M ± 334K 21.4M ... 22.8M 0 ( 0%) 0%
 branch_misses 18.3M ± 164K 18.0M ... 18.6M 0 ( 0%) 0%
Benchmark 2 (42 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe hello.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 477ms ± 5.83ms 462ms ... 492ms 0 ( 0%) 💩+ 11.9% ± 0.5%
 peak_rss 182MB ± 422KB 181MB ... 183MB 0 ( 0%) ⚡- 2.2% ± 0.1%
 cpu_cycles 3.51G ± 30.3M 3.46G ... 3.58G 0 ( 0%) 💩+ 2.4% ± 0.3%
 instructions 6.92G ± 842K 6.92G ... 6.93G 1 ( 2%) 💩+ 2.9% ± 0.0%
 cache_references 292M ± 1.70M 289M ... 298M 1 ( 2%) 💩+ 11.0% ± 0.3%
 cache_misses 26.4M ± 378K 25.5M ... 27.0M 0 ( 0%) 💩+ 19.2% ± 0.7%
 branch_misses 20.0M ± 185K 19.6M ... 20.3M 0 ( 0%) 💩+ 9.4% ± 0.4%
Benchmark 1 (64 runs): zig/master/zig-native-safe/bin/zig build-exe hello.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 316ms ± 3.56ms 309ms ... 325ms 0 ( 0%) 0%
 peak_rss 147MB ± 310KB 146MB ... 148MB 2 ( 3%) 0%
 cpu_cycles 1.27G ± 12.5M 1.25G ... 1.30G 3 ( 5%) 0%
 instructions 2.56G ± 191K 2.56G ... 2.56G 0 ( 0%) 0%
 cache_references 122M ± 420K 121M ... 123M 0 ( 0%) 0%
 cache_misses 7.40M ± 116K 7.21M ... 7.74M 0 ( 0%) 0%
 branch_misses 4.48M ± 36.3K 4.42M ... 4.58M 1 ( 2%) 0%
Benchmark 2 (64 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe hello.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 314ms ± 3.87ms 308ms ... 329ms 1 ( 2%) - 0.5% ± 0.4%
 peak_rss 144MB ± 357KB 143MB ... 145MB 0 ( 0%) ⚡- 2.3% ± 0.1%
 cpu_cycles 1.25G ± 14.2M 1.23G ... 1.31G 1 ( 2%) ⚡- 1.4% ± 0.4%
 instructions 2.61G ± 110K 2.61G ... 2.61G 14 (22%) 💩+ 1.8% ± 0.0%
 cache_references 124M ± 1.78M 122M ... 130M 10 (16%) 💩+ 1.8% ± 0.4%
 cache_misses 7.37M ± 169K 7.08M ... 8.02M 3 ( 5%) - 0.5% ± 0.7%
 branch_misses 5.09M ± 59.7K 5.00M ... 5.26M 1 ( 2%) 💩+ 13.7% ± 0.4%
Benchmark 1 (60 runs): zig/master/zig-native-fast/bin/zig build-exe hello.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 333ms ± 4.27ms 325ms ... 346ms 1 ( 2%) 0%
 peak_rss 160MB ± 330KB 160MB ... 161MB 0 ( 0%) 0%
 cpu_cycles 2.38G ± 18.0M 2.33G ... 2.42G 2 ( 3%) 0%
 instructions 4.09G ± 879K 4.09G ... 4.10G 3 ( 5%) 0%
 cache_references 178M ± 1.15M 176M ... 181M 0 ( 0%) 0%
 cache_misses 15.9M ± 313K 15.1M ... 16.5M 1 ( 2%) 0%
 branch_misses 14.9M ± 151K 14.5M ... 15.2M 2 ( 3%) 0%
Benchmark 2 (69 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe hello.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 291ms ± 4.96ms 279ms ... 302ms 0 ( 0%) ⚡- 12.7% ± 0.5%
 peak_rss 160MB ± 274KB 159MB ... 161MB 2 ( 3%) - 0.4% ± 0.1%
 cpu_cycles 2.23G ± 29.3M 2.15G ... 2.29G 0 ( 0%) ⚡- 6.2% ± 0.4%
 instructions 3.96G ± 683K 3.96G ... 3.97G 5 ( 7%) ⚡- 3.2% ± 0.0%
 cache_references 176M ± 1.90M 171M ... 179M 1 ( 1%) ⚡- 1.4% ± 0.3%
 cache_misses 15.0M ± 594K 13.4M ... 16.1M 0 ( 0%) ⚡- 6.0% ± 1.1%
 branch_misses 15.0M ± 259K 14.3M ... 15.5M 0 ( 0%) + 1.0% ± 0.5%
Benchmark 1 (82 runs): zig/master/zig-native-fast/bin/zig build-exe hello.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 244ms ± 2.87ms 239ms ... 257ms 1 ( 1%) 0%
 peak_rss 123MB ± 202KB 122MB ... 123MB 0 ( 0%) 0%
 cpu_cycles 916M ± 9.16M 903M ... 961M 3 ( 4%) 0%
 instructions 1.55G ± 150K 1.55G ... 1.55G 0 ( 0%) 0%
 cache_references 82.0M ± 491K 81.0M ... 83.9M 3 ( 4%) 0%
 cache_misses 5.23M ± 78.4K 5.03M ... 5.42M 0 ( 0%) 0%
 branch_misses 4.12M ± 28.5K 4.05M ... 4.20M 6 ( 7%) 0%
Benchmark 2 (85 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe hello.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 238ms ± 2.86ms 233ms ... 246ms 3 ( 4%) ⚡- 2.7% ± 0.4%
 peak_rss 121MB ± 166KB 121MB ... 122MB 1 ( 1%) - 1.0% ± 0.0%
 cpu_cycles 877M ± 9.64M 861M ... 902M 4 ( 5%) ⚡- 4.3% ± 0.3%
 instructions 1.46G ± 32.4K 1.46G ... 1.46G 2 ( 2%) ⚡- 5.6% ± 0.0%
 cache_references 82.2M ± 365K 81.4M ... 83.4M 1 ( 1%) + 0.3% ± 0.2%
 cache_misses 5.62M ± 97.6K 5.39M ... 6.01M 2 ( 2%) 💩+ 7.6% ± 0.5%
 branch_misses 4.83M ± 29.8K 4.76M ... 4.92M 6 ( 7%) 💩+ 17.1% ± 0.2%
Benchmark 1 (3 runs): zig/master/zig-native-safe/bin/zig test zig/master/lib/std/std.zig -femit-bin=t --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 17.2s ± 55.7ms 17.1s ... 17.2s 0 ( 0%) 0%
 peak_rss 949MB ± 6.95MB 941MB ... 955MB 0 ( 0%) 0%
 cpu_cycles 99.9G ± 123M 99.7G ... 100.0G 0 ( 0%) 0%
 instructions 232G ± 5.19M 232G ... 232G 0 ( 0%) 0%
 cache_references 7.47G ± 8.45M 7.47G ... 7.48G 0 ( 0%) 0%
 cache_misses 377M ± 2.99M 375M ... 381M 0 ( 0%) 0%
 branch_misses 284M ± 990K 283M ... 285M 0 ( 0%) 0%
Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-safe/bin/zig test zig/lets-get-typing/lib/std/std.zig -femit-bin=t --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 16.9s ± 95.4ms 16.8s ... 17.0s 0 ( 0%) - 1.4% ± 1.0%
 peak_rss 946MB ± 3.27MB 944MB ... 950MB 0 ( 0%) - 0.2% ± 1.3%
 cpu_cycles 96.9G ± 203M 96.7G ... 97.1G 0 ( 0%) ⚡- 3.0% ± 0.4%
 instructions 233G ± 2.19M 233G ... 233G 0 ( 0%) + 0.2% ± 0.0%
 cache_references 7.65G ± 35.3M 7.61G ... 7.67G 0 ( 0%) 💩+ 2.3% ± 0.8%
 cache_misses 407M ± 7.38M 399M ... 414M 0 ( 0%) 💩+ 7.7% ± 3.4%
 branch_misses 305M ± 2.54M 303M ... 308M 0 ( 0%) 💩+ 7.4% ± 1.5%
Benchmark 1 (3 runs): zig/master/zig-native-safe/bin/zig test zig/master/lib/std/std.zig -fno-emit-bin --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 15.4s ± 60.3ms 15.3s ... 15.5s 0 ( 0%) 0%
 peak_rss 712MB ± 256KB 712MB ... 713MB 0 ( 0%) 0%
 cpu_cycles 66.1G ± 261M 65.9G ... 66.4G 0 ( 0%) 0%
 instructions 160G ± 62.9K 160G ... 160G 0 ( 0%) 0%
 cache_references 5.37G ± 38.3M 5.34G ... 5.41G 0 ( 0%) 0%
 cache_misses 170M ± 1.82M 168M ... 172M 0 ( 0%) 0%
 branch_misses 104M ± 430K 104M ... 105M 0 ( 0%) 0%
Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-safe/bin/zig test zig/lets-get-typing/lib/std/std.zig -fno-emit-bin --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 14.4s ± 69.0ms 14.3s ... 14.5s 0 ( 0%) ⚡- 6.6% ± 1.0%
 peak_rss 665MB ± 141KB 665MB ... 665MB 0 ( 0%) ⚡- 6.7% ± 0.1%
 cpu_cycles 61.5G ± 235M 61.3G ... 61.8G 0 ( 0%) ⚡- 6.9% ± 0.9%
 instructions 158G ± 905K 158G ... 158G 0 ( 0%) ⚡- 1.2% ± 0.0%
 cache_references 5.09G ± 26.9M 5.07G ... 5.12G 0 ( 0%) ⚡- 5.2% ± 1.4%
 cache_misses 153M ± 2.04M 151M ... 155M 0 ( 0%) ⚡- 10.1% ± 2.6%
 branch_misses 110M ± 413K 109M ... 110M 0 ( 0%) 💩+ 5.2% ± 0.9%
Benchmark 1 (3 runs): zig/master/zig-native-fast/bin/zig test zig/master/lib/std/std.zig -femit-bin=t --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 13.2s ± 502ms 12.8s ... 13.8s 0 ( 0%) 0%
 peak_rss 894MB ± 3.31MB 891MB ... 898MB 0 ( 0%) 0%
 cpu_cycles 70.8G ± 200M 70.7G ... 71.1G 0 ( 0%) 0%
 instructions 139G ± 3.28M 139G ... 139G 0 ( 0%) 0%
 cache_references 5.09G ± 11.7M 5.08G ... 5.10G 0 ( 0%) 0%
 cache_misses 266M ± 753K 265M ... 266M 0 ( 0%) 0%
 branch_misses 225M ± 1.45M 224M ... 226M 0 ( 0%) 0%
Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-fast/bin/zig test zig/lets-get-typing/lib/std/std.zig -femit-bin=t --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 11.6s ± 81.5ms 11.5s ... 11.7s 0 ( 0%) ⚡- 12.0% ± 6.2%
 peak_rss 898MB ± 1.21MB 896MB ... 899MB 0 ( 0%) + 0.4% ± 0.6%
 cpu_cycles 64.6G ± 178M 64.5G ... 64.8G 0 ( 0%) ⚡- 8.8% ± 0.6%
 instructions 133G ± 3.14M 133G ... 133G 0 ( 0%) ⚡- 4.8% ± 0.0%
 cache_references 4.81G ± 17.3M 4.79G ... 4.82G 0 ( 0%) ⚡- 5.6% ± 0.7%
 cache_misses 242M ± 5.24M 236M ... 245M 0 ( 0%) ⚡- 9.1% ± 3.2%
 branch_misses 232M ± 1.80M 230M ... 234M 0 ( 0%) 💩+ 3.1% ± 1.6%
Benchmark 1 (3 runs): zig/master/zig-native-fast/bin/zig test zig/master/lib/std/std.zig -fno-emit-bin --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 11.3s ± 42.2ms 11.3s ... 11.4s 0 ( 0%) 0%
 peak_rss 672MB ± 147KB 672MB ... 672MB 0 ( 0%) 0%
 cpu_cycles 48.2G ± 183M 48.0G ... 48.4G 0 ( 0%) 0%
 instructions 95.3G ± 182K 95.3G ... 95.3G 0 ( 0%) 0%
 cache_references 3.62G ± 29.4M 3.60G ... 3.65G 0 ( 0%) 0%
 cache_misses 116M ± 1.37M 115M ... 118M 0 ( 0%) 0%
 branch_misses 85.6M ± 614K 84.9M ... 86.1M 0 ( 0%) 0%
Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-fast/bin/zig test zig/lets-get-typing/lib/std/std.zig -fno-emit-bin --test-no-exec
 measurement mean ± σ min ... max outliers delta
 wall_time 10.3s ± 25.6ms 10.3s ... 10.3s 0 ( 0%) ⚡- 8.8% ± 0.7%
 peak_rss 621MB ± 77.8KB 621MB ... 621MB 0 ( 0%) ⚡- 7.6% ± 0.0%
 cpu_cycles 43.8G ± 113M 43.7G ... 43.9G 0 ( 0%) ⚡- 9.1% ± 0.7%
 instructions 89.4G ± 472K 89.4G ... 89.4G 0 ( 0%) ⚡- 6.2% ± 0.0%
 cache_references 3.43G ± 17.1M 3.41G ... 3.44G 0 ( 0%) ⚡- 5.2% ± 1.5%
 cache_misses 118M ± 318K 118M ... 118M 0 ( 0%) + 1.3% ± 1.9%
 branch_misses 102M ± 575K 102M ... 103M 0 ( 0%) 💩+ 19.5% ± 1.6%
Benchmark 1 (46 runs): zig/master/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 440ms ± 5.39ms 430ms ... 455ms 1 ( 2%) 0%
 peak_rss 203MB ± 591KB 202MB ... 205MB 0 ( 0%) 0%
 cpu_cycles 3.35G ± 24.8M 3.30G ... 3.42G 2 ( 4%) 0%
 instructions 6.57G ± 480K 6.57G ... 6.57G 0 ( 0%) 0%
 cache_references 251M ± 1.46M 248M ... 254M 0 ( 0%) 0%
 cache_misses 21.5M ± 402K 20.6M ... 22.2M 0 ( 0%) 0%
 branch_misses 17.8M ± 205K 17.4M ... 18.3M 0 ( 0%) 0%
Benchmark 2 (42 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 486ms ± 6.04ms 477ms ... 501ms 0 ( 0%) 💩+ 10.4% ± 0.6%
 peak_rss 201MB ± 369KB 200MB ... 202MB 1 ( 2%) ⚡- 1.3% ± 0.1%
 cpu_cycles 3.43G ± 32.2M 3.37G ... 3.51G 3 ( 7%) 💩+ 2.3% ± 0.4%
 instructions 6.74G ± 538K 6.74G ... 6.74G 0 ( 0%) 💩+ 2.6% ± 0.0%
 cache_references 279M ± 1.82M 276M ... 284M 1 ( 2%) 💩+ 10.9% ± 0.3%
 cache_misses 25.3M ± 393K 24.8M ... 26.3M 0 ( 0%) 💩+ 17.8% ± 0.8%
 branch_misses 19.3M ± 177K 19.0M ... 19.7M 0 ( 0%) 💩+ 8.3% ± 0.5%
Benchmark 1 (61 runs): zig/master/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 331ms ± 4.18ms 323ms ... 344ms 1 ( 2%) 0%
 peak_rss 162MB ± 398KB 161MB ... 163MB 0 ( 0%) 0%
 cpu_cycles 1.25G ± 16.4M 1.23G ... 1.29G 0 ( 0%) 0%
 instructions 2.53G ± 77.3K 2.53G ... 2.53G 0 ( 0%) 0%
 cache_references 116M ± 485K 115M ... 118M 1 ( 2%) 0%
 cache_misses 7.42M ± 126K 7.21M ... 7.91M 3 ( 5%) 0%
 branch_misses 4.56M ± 41.6K 4.50M ... 4.73M 1 ( 2%) 0%
Benchmark 2 (61 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 330ms ± 5.66ms 321ms ... 354ms 2 ( 3%) - 0.2% ± 0.5%
 peak_rss 160MB ± 372KB 159MB ... 161MB 1 ( 2%) ⚡- 1.5% ± 0.1%
 cpu_cycles 1.24G ± 20.3M 1.22G ... 1.33G 2 ( 3%) - 1.5% ± 0.5%
 instructions 2.55G ± 129K 2.55G ... 2.55G 16 (26%) 💩+ 1.1% ± 0.0%
 cache_references 117M ± 1.14M 116M ... 121M 6 (10%) 💩+ 1.3% ± 0.3%
 cache_misses 7.40M ± 253K 7.15M ... 8.72M 2 ( 3%) - 0.3% ± 1.0%
 branch_misses 5.12M ± 80.5K 5.03M ... 5.46M 3 ( 5%) 💩+ 12.3% ± 0.5%
Benchmark 1 (58 runs): zig/master/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 350ms ± 4.45ms 341ms ... 366ms 1 ( 2%) 0%
 peak_rss 175MB ± 348KB 175MB ... 176MB 0 ( 0%) 0%
 cpu_cycles 2.34G ± 21.7M 2.29G ... 2.43G 1 ( 2%) 0%
 instructions 3.98G ± 717K 3.98G ... 3.98G 2 ( 3%) 0%
 cache_references 171M ± 936K 169M ... 174M 0 ( 0%) 0%
 cache_misses 15.6M ± 276K 14.9M ... 16.3M 1 ( 2%) 0%
 branch_misses 14.6M ± 126K 14.3M ... 14.9M 1 ( 2%) 0%
Benchmark 2 (65 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig
 measurement mean ± σ min ... max outliers delta
 wall_time 308ms ± 4.88ms 300ms ... 323ms 1 ( 2%) ⚡- 12.0% ± 0.5%
 peak_rss 175MB ± 341KB 174MB ... 176MB 0 ( 0%) - 0.1% ± 0.1%
 cpu_cycles 2.18G ± 28.2M 2.13G ... 2.25G 0 ( 0%) ⚡- 6.9% ± 0.4%
 instructions 3.85G ± 619K 3.85G ... 3.85G 1 ( 2%) ⚡- 3.2% ± 0.0%
 cache_references 167M ± 1.57M 163M ... 171M 1 ( 2%) ⚡- 2.4% ± 0.3%
 cache_misses 14.4M ± 453K 13.4M ... 15.2M 0 ( 0%) ⚡- 7.7% ± 0.9%
 branch_misses 14.6M ± 209K 14.1M ... 15.0M 0 ( 0%) + 0.1% ± 0.4%
Benchmark 1 (77 runs): zig/master/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 260ms ± 3.71ms 253ms ... 269ms 0 ( 0%) 0%
 peak_rss 135MB ± 184KB 135MB ... 136MB 1 ( 1%) 0%
 cpu_cycles 917M ± 13.8M 895M ... 962M 7 ( 9%) 0%
 instructions 1.51G ± 33.6K 1.51G ... 1.51G 0 ( 0%) 0%
 cache_references 77.1M ± 368K 76.4M ... 78.3M 1 ( 1%) 0%
 cache_misses 5.27M ± 88.5K 5.10M ... 5.53M 0 ( 0%) 0%
 branch_misses 4.21M ± 31.8K 4.15M ... 4.31M 1 ( 1%) 0%
Benchmark 2 (79 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 253ms ± 3.29ms 246ms ... 264ms 1 ( 1%) ⚡- 2.6% ± 0.4%
 peak_rss 135MB ± 192KB 134MB ... 135MB 0 ( 0%) - 0.4% ± 0.0%
 cpu_cycles 878M ± 11.7M 859M ... 909M 0 ( 0%) ⚡- 4.3% ± 0.4%
 instructions 1.43G ± 73.5K 1.43G ... 1.43G 13 (16%) ⚡- 5.6% ± 0.0%
 cache_references 77.4M ± 546K 76.6M ... 79.3M 3 ( 4%) + 0.5% ± 0.2%
 cache_misses 5.64M ± 123K 5.39M ... 6.26M 1 ( 1%) 💩+ 7.0% ± 0.6%
 branch_misses 4.85M ± 36.3K 4.79M ... 5.05M 4 ( 5%) 💩+ 15.2% ± 0.3%
Benchmark 1 (12 runs): zig/master/zig-native-safe/bin/zig build-exe [...]
 measurement mean ± σ min ... max outliers delta
 wall_time 2.54s ± 34.9ms 2.50s ... 2.62s 0 ( 0%) 0%
 peak_rss 341MB ± 703KB 339MB ... 342MB 2 (17%) 0%
 cpu_cycles 21.5G ± 250M 21.3G ... 22.2G 1 ( 8%) 0%
 instructions 42.8G ± 1.34M 42.8G ... 42.8G 1 ( 8%) 0%
 cache_references 1.61G ± 9.58M 1.60G ... 1.63G 1 ( 8%) 0%
 cache_misses 130M ± 2.62M 126M ... 136M 1 ( 8%) 0%
 branch_misses 105M ± 745K 104M ... 106M 0 ( 0%) 0%
Benchmark 2 (10 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe [...]
 measurement mean ± σ min ... max outliers delta
 wall_time 3.17s ± 35.7ms 3.13s ... 3.23s 0 ( 0%) 💩+ 24.6% ± 1.2%
 peak_rss 335MB ± 569KB 334MB ... 336MB 1 (10%) ⚡- 1.6% ± 0.2%
 cpu_cycles 22.8G ± 336M 22.5G ... 23.4G 0 ( 0%) 💩+ 5.9% ± 1.2%
 instructions 44.8G ± 5.17M 44.8G ... 44.8G 0 ( 0%) 💩+ 4.5% ± 0.0%
 cache_references 1.83G ± 12.3M 1.81G ... 1.85G 0 ( 0%) 💩+ 13.7% ± 0.6%
 cache_misses 166M ± 2.53M 161M ... 169M 0 ( 0%) 💩+ 27.3% ± 1.8%
 branch_misses 120M ± 734K 119M ... 121M 0 ( 0%) 💩+ 14.4% ± 0.6%
Benchmark 1 (16 runs): zig/master/zig-native-safe/bin/zig build-exe [...] -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 1.94s ± 8.64ms 1.92s ... 1.95s 0 ( 0%) 0%
 peak_rss 202MB ± 429KB 201MB ... 203MB 2 (13%) 0%
 cpu_cycles 8.29G ± 36.4M 8.23G ... 8.36G 0 ( 0%) 0%
 instructions 17.2G ± 853K 17.2G ... 17.2G 0 ( 0%) 0%
 cache_references 782M ± 2.78M 779M ... 790M 2 (13%) 0%
 cache_misses 40.5M ± 720K 38.8M ... 41.5M 0 ( 0%) 0%
 branch_misses 24.2M ± 141K 24.1M ... 24.5M 0 ( 0%) 0%
Benchmark 2 (16 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe [...] -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 1.92s ± 15.5ms 1.90s ... 1.97s 2 (13%) - 1.0% ± 0.5%
 peak_rss 202MB ± 426KB 201MB ... 203MB 0 ( 0%) + 0.2% ± 0.2%
 cpu_cycles 8.14G ± 64.6M 8.07G ... 8.37G 2 (13%) ⚡- 1.8% ± 0.5%
 instructions 17.7G ± 361K 17.7G ... 17.7G 0 ( 0%) 💩+ 3.1% ± 0.0%
 cache_references 774M ± 5.09M 768M ... 788M 1 ( 6%) - 1.0% ± 0.4%
 cache_misses 41.1M ± 1.62M 39.4M ... 46.7M 1 ( 6%) + 1.6% ± 2.2%
 branch_misses 27.6M ± 377K 27.4M ... 29.0M 1 ( 6%) 💩+ 14.0% ± 0.8%
Benchmark 1 (16 runs): zig/master/zig-native-fast/bin/zig build-exe [...]
 measurement mean ± σ min ... max outliers delta
 wall_time 1.92s ± 14.2ms 1.90s ... 1.96s 0 ( 0%) 0%
 peak_rss 305MB ± 614KB 304MB ... 306MB 0 ( 0%) 0%
 cpu_cycles 14.8G ± 70.3M 14.7G ... 15.0G 0 ( 0%) 0%
 instructions 25.9G ± 1.43M 25.9G ... 25.9G 0 ( 0%) 0%
 cache_references 1.09G ± 4.82M 1.08G ... 1.10G 0 ( 0%) 0%
 cache_misses 91.2M ± 1.51M 86.8M ... 92.9M 1 ( 6%) 0%
 branch_misses 83.8M ± 715K 82.2M ... 85.1M 0 ( 0%) 0%
Benchmark 2 (19 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe [...]
 measurement mean ± σ min ... max outliers delta
 wall_time 1.66s ± 13.9ms 1.64s ... 1.69s 0 ( 0%) ⚡- 13.5% ± 0.5%
 peak_rss 302MB ± 335KB 302MB ... 303MB 0 ( 0%) - 0.8% ± 0.1%
 cpu_cycles 13.6G ± 95.0M 13.5G ... 13.8G 0 ( 0%) ⚡- 8.2% ± 0.4%
 instructions 25.0G ± 1.44M 25.0G ... 25.0G 1 ( 5%) ⚡- 3.5% ± 0.0%
 cache_references 1.04G ± 4.92M 1.03G ... 1.05G 0 ( 0%) ⚡- 3.9% ± 0.3%
 cache_misses 82.1M ± 1.62M 79.6M ... 86.5M 1 ( 5%) ⚡- 10.0% ± 1.2%
 branch_misses 83.2M ± 935K 81.7M ... 85.2M 2 (11%) - 0.7% ± 0.7%
Benchmark 1 (21 runs): zig/master/zig-native-fast/bin/zig build-exe [...] -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 1.44s ± 19.6ms 1.42s ... 1.52s 1 ( 5%) 0%
 peak_rss 171MB ± 249KB 171MB ... 172MB 0 ( 0%) 0%
 cpu_cycles 6.05G ± 87.7M 5.99G ... 6.41G 1 ( 5%) 0%
 instructions 10.4G ± 837K 10.4G ... 10.4G 0 ( 0%) 0%
 cache_references 527M ± 10.7M 522M ... 572M 2 (10%) 0%
 cache_misses 28.3M ± 639K 27.4M ... 30.4M 1 ( 5%) 0%
 branch_misses 22.0M ± 157K 21.7M ... 22.4M 2 (10%) 0%
Benchmark 2 (22 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe [...] -fno-emit-bin
 measurement mean ± σ min ... max outliers delta
 wall_time 1.37s ± 14.4ms 1.35s ... 1.40s 0 ( 0%) ⚡- 5.0% ± 0.7%
 peak_rss 172MB ± 191KB 171MB ... 172MB 0 ( 0%) + 0.2% ± 0.1%
 cpu_cycles 5.67G ± 45.3M 5.61G ... 5.78G 0 ( 0%) ⚡- 6.2% ± 0.7%
 instructions 9.83G ± 357K 9.83G ... 9.84G 0 ( 0%) ⚡- 5.3% ± 0.0%
 cache_references 516M ± 3.02M 513M ... 523M 3 (14%) ⚡- 2.2% ± 0.9%
 cache_misses 31.0M ± 871K 29.8M ... 33.4M 1 ( 5%) 💩+ 9.8% ± 1.7%
 branch_misses 26.4M ± 323K 26.1M ... 27.4M 3 (14%) 💩+ 19.9% ± 0.7%
This branch implements a major rework of the Zig compiler's type resolution system. # Background The logic for type resolution in the Zig compiler has, over time, built up a collection of hacks which work to solve specific use cases. Unfortunately, the approaches used are deeply flawed and lead to [lots of bugs](https://github.com/ziglang/zig/issues/24637). The logic as it exists today simply cannot be formalized into a coherent language specification. Moreover, it is not compatible with incremental compilation or parallel semantic analysis, both of which are of course things we want to introduce (though incremental compilation of course exists today, type resolution is one of the main things which can trigger bugs in it). This branch aims to sacrifice a small number of nice language properties to make type resolution significantly more straightforward to specify and implement. # The Bad Stuff Let's get this out of the way first: what are the aforementioned sacrifices? Don't worry---there are only a handful. The first is that pointers to comptime-only types are no longer themselves considered comptime-only. For instance, though `comptime_int` is a comptime-only type, `*comptime_int` is not, and neither is `[]comptime_int`. This may seem confusing at first---the easiest way to understand it is to consider function pointers. The type `*const fn () void` is a runtime type. However, you are not allowed to *dereference* it at runtime, because the element type (the function body type `fn () void`) is comptime-only. So these pointers can *exist* at runtime, but may only be *dereferenced* at compile-time. This makes them more-or-less useless at runtime---but there's actually an exception to that! Suppose you have a `[]const std.builtin.Type.StructField`, and you want to pass the `name` of each field to runtime code somehow. Previously, you would have done this by constructing a separate `[]const []const u8`. However, now, you can pass the `[]const std.builtin.Type.StructField` directly to a runtime function. Naturally, this function cannot load a `StructField` from this slice at runtime. However, what it *can* do is load the `name` field, because *it* has a runtime type! This didn't require any new logic in the compiler backends (Jacob and Andrew will know why :P), it just popped out as a natural consequence of this change. I'm not claiming this change is necessarily a good thing (I think it's fairly neutral really), but it *is* interesting to see that it simplifies certain use cases. The second change in this area is to do with pointer alignment. Previously, `*u8` and `*align(1) u8` were considered by Zig to be literally the same type; they would compare equal, and `*u8` was considered the canonical spelling (it's what the compiler would print). This branch changes this: those two types are no longer considered equivalent. **Crucially, the two types can still be used interchangably.** They coerce to one another, even though pointers (what the compiler calls "in-memory coercions"), and in almost every case there is no need to care which one you have (for instance, when migrating the standard library in this branch, I did not need to think about that difference *ever*). You could think of this difference as being like the difference between `u32` and `c_uint`: technically they are different types, but (assuming your target has 32-bit `int`) they act identically for all intents and purposes, and it doesn't technically matter which one you pick. Lastly, this branch will introduce *some* cases which are now dependency loops when they previously were not. There aren't many of these, but notably, `std.MultiArrayList` did encounter one of them: I ended up needing to change the type of the `bytes` field on `MultiArrayList` to not have the correct `align` annotation (though this wasn't a big deal since that field is always accessed through a function call anyway). However, I believe that, if nothing else, it's now much more obvious *why* a dependency loop exists---the new compile errors for them (more about that later) give a good amount of detail, and in my experience there hasn't been any example which I thought should "obviously" work which actually triggered a dependency loop. In other words, I think the new system is easier for users to intuit, and always gives sensible-looking results. # The Good Stuff ## Lazy field analysis A problem we've noticed since introducing `std.Io` is that if a type is used as a namespace, its fields will be analyzed anyway. For instance, using `std.Io.Writer` in any way pulls in the vtable of `std.Io`. Some cases of this could even result in unnecessary codegen, which can bloat binaries. This decision was made [around 2 years back](https://github.com/ziglang/zig/pull/20494), but it's pretty clear now that it's not ideal, so [#30842](https://codeberg.org/ziglang/zig/issues/30842) was opened to change this design. This PR achieves that. Container types---meaning `struct`s (including files), `union`s, `enum`s, and `opaque`s---will now, broadly speaking, only be "resolved" when something about how that type "looks", such as its size or the type of one of its fields, is required. This means that not only can you use types as namespaces without referencing them, but you can even use pointers `*T` without needing `T` to be resolved (until you dereference that pointer or something, of course). Resolves: https://codeberg.org/ziglang/zig/issues/30842 ## Dependency loop compile errors When you do trigger dependency loops, the compile error is now much more useful. "Dependency loop" is a general term here: it applies not only to types, but to dependency loops between declarations and between functions (when resolving inferred error sets). In the past, hitting any such dependency loop would emit a very unhelpful error message saying "dependency loop detected" or "struct depends on itself" at a place vaguely near one of the components of the dependency loop. It was essentially impossible to actually figure out where the loop was coming from and how to solve it. Now, the error actually explains what's going on! Here are a couple of straightforward examples: ```zig // repro.zig const x = x + 1; comptime { _ = x; } const S = struct { other: S }; comptime { _ = @as(S, undefined); } const A = struct { b: B }; const B = struct { a: A }; comptime { _ = @as(A, undefined); } ``` ```sh-session $ zig build-obj repro.zig error: dependency loop with length 2 repro.zig:13:23: note: type 'repro.A' depends on type 'repro.B' for field declared here const A = struct { b: B }; ^ repro.zig:14:23: note: type 'repro.B' depends on type 'repro.A' for field declared here const B = struct { a: A }; ^ note: eliminate any one of these dependencies to break the loop repro.zig:8:27: error: type 'repro.S' depends on itself for field declared here const S = struct { other: S }; ^ repro.zig:3:11: error: value of declaration 'repro.x' depends on itself here const x = x + 1; ^ ``` ...and here's a more complicated example: ```zig // repro.zig const a: @Int(.unsigned, b.n) = 123; const b: S = .{}; const S = struct { n: u32 = err_set_len, }; const err_set_len = @typeInfo(@typeInfo(@typeInfo(@TypeOf(myFn)).@"fn".return_type.?).error_union.error_set).error_set.len; fn myFn() !void { if (@TypeOf(a) == u0) return error.ThereHaveBeenExplosions; } comptime { _ = a; } ``` ```sh-session $ ./zig-native-safe/bin/zig build-obj repro.zig error: dependency loop with length 6 repro.zig:3:27: note: type of declaration 'repro.a' uses value of declaration 'repro.b' here const a: @Int(.unsigned, b.n) = 123; ~^~ repro.zig:5:15: note: value of declaration 'repro.b' uses default field values of 'repro.S' here const b: S = .{}; ~^~ repro.zig:8:14: note: default field value of 'repro.S' uses value of declaration 'repro.err_set_len' here n: u32 = err_set_len, ^~~~~~~~~~~ repro.zig:11:21: note: value of declaration 'repro.err_set_len' uses inferred error set of function 'repro.myFn' here const err_set_len = @typeInfo(@typeInfo(@typeInfo(@TypeOf(myFn)).@"fn".return_type.?).error_union.error_set).error_set.len; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ repro.zig:14:17: note: function 'repro.myFn' uses value of declaration 'repro.a' here if (@TypeOf(a) == u0) return error.ThereHaveBeenExplosions; ^ repro.zig:3:33: note: value of declaration 'repro.a' uses type of declaration 'repro.a' here const a: @Int(.unsigned, b.n) = 123; ^~~ note: eliminate any one of these dependencies to break the loop ``` ## Incremental compilation One of the biggest enhancements made in this branch is to incremental compilation. Reworking type resolution was able to solve some serious bugs in incremental compilation, and in particular, solve over-analysis (where an incremental update does more work than it needs to) pretty much *entirely*. The reason for this is because the incremental dependency graph (which is also tied to Zig's semantic analysis model, and so will be partially specified in the langspec) is now acyclic (so is now a DAG) where it previously contained cycles. This is a big deal because acyclic graphs are massively simpler and more efficient to work with (in fact, this property is responsible for most of the type resolution bugs fixed in this branch; making the dependency graph a DAG was in a very real sense the primary purpose of this branch). The compiler no longer has to guess what is best to analyze---it *knows*. For instance, when using incremental compilation on the Zig compiler itself, examples which would previously re-analyze almost all of the compiler(!) now only re-analyze one trivial function. This makes incremental compilation significantly faster in many cases. ~~EDITOR'S NOTE: uh, actually, I seem to have broken this somehow since I last checked. I'll be sure to investigate and get it fixed before I merge this PR---I'm confident that it won't be hard.~~ All fixed now :) ## Language simplifications By designing type resolution to avoid loops in the dependency graph, the language has been hugely simplified under the hood, as reflected by the change in the compiler's line count. For instance, the concept of "lazy values"---which were a common source of bugs and would likely have bloated the langspec quite a bit---has been entirely eliminated; and type resolution (aside from struct default field values) now happens in one phase instead of 4. ## Bug fixes These seem to be fixed on master anyway, but I'm now confident they will *continue* to work: Resolves: https://github.com/ziglang/zig/issues/14353 Resolves: https://github.com/ziglang/zig/issues/17550 Resolves: https://github.com/ziglang/zig/issues/19920 Resolves: https://github.com/ziglang/zig/issues/23344 These previously crashed the compiler, and now fail compilation as expected: Resolves: https://github.com/ziglang/zig/issues/17603 Resolves: https://github.com/ziglang/zig/issues/18346 Resolves: https://github.com/ziglang/zig/issues/20134 Resolves: https://github.com/ziglang/zig/issues/24269 These previously failed with dependency loops (possibly inconsistently), and now (consistently) succeed: Resolves: https://github.com/ziglang/zig/issues/16932 Resolves: https://github.com/ziglang/zig/issues/17255 Resolves: https://github.com/ziglang/zig/issues/23362 Resolves: https://github.com/ziglang/zig/issues/24604 Resolves: https://github.com/ziglang/zig/issues/24636 These previously failed inconsistently, and now do so consistently: Resolves: https://github.com/ziglang/zig/issues/17874 Resolves: https://github.com/ziglang/zig/issues/18478 Resolves: https://github.com/ziglang/zig/issues/23400 These previously failed with dependency loops; they still do, but I now consider them "wontfix": Resolves: https://github.com/ziglang/zig/issues/12325 Resolves: https://github.com/ziglang/zig/issues/18664 Misc. fixes: Resolves: https://github.com/ziglang/zig/issues/16199 Resolves: https://github.com/ziglang/zig/issues/21222 Resolves: https://github.com/ziglang/zig/issues/22742 Resolves: https://github.com/ziglang/zig/issues/22986 Resolves: https://github.com/ziglang/zig/issues/23222 Resolves: https://github.com/ziglang/zig/issues/24071 Resolves: https://github.com/ziglang/zig/issues/24088 Resolves: https://github.com/ziglang/zig/issues/24882 Resolves: https://github.com/ziglang/zig/issues/25226 Resolves: https://github.com/ziglang/zig/issues/25769 Resolves: https://github.com/ziglang/zig/issues/25771 Resolves: https://codeberg.org/ziglang/zig/issues/31013 Resolves: https://codeberg.org/ziglang/zig/issues/31080 Resolves: https://codeberg.org/ziglang/zig/issues/31350 # Misc. Changes ## Implemented accepted proposals * **breaking:** disallow pointers in `packed struct` and `packed union` types * **breaking:** disallow `enum`/`packed struct`/`packed union` with implicit backing type in `extern` positions * allow explicit backing integer of `packed union` Resolves: https://github.com/ziglang/zig/issues/24657 Resolves: https://github.com/ziglang/zig/issues/24714 Resolves: https://github.com/ziglang/zig/issues/25350 ## Small `std.builtin.Type` changes The `alignment` fields in `std.builtin.Type.{Pointer,StructField,UnionField}` has been updated to have type `?usize` rather than `comptime_int`. The use of `usize` over `comptime_int` is just because it's a more sensible integer type here---what matters is that it's now optional. * For pointers, `.alignment = null` indicates a default-aligned (as opposed to explicitly-aligned) pointer, i.e. `*T` instead of `*align(a) T`. This is due to the fact that `*T` and `*align(@alignOf(T)) T` are now different types. If you need the actual alignment of the pointer address, you can use `ptr_info.alignment orelse @alignOf(ptr_info.child)`. If you're going to pass the value back into `@Pointer` because you're just trying to "modify" a pointer type (e.g. `[]T` -> `*T`), then more often than not you just want to pass `ptr_info.alignment` straight into `std.Type.Pointer.Attributes.@"align"`---so, default-alignment in means default-alignment out. * For struct and union fields, `.alignment = null` means the field has no explicit alignment annotation (so, the field is only populated if the field has an explicit `align(a)` annotation). Previously, this field was populated by the compiler with an "inferred" alignment in that case, but the semantics of this were made ambiguous by `extern` types, where "actual" alignments may be higher than natural alignments (or, indeed, explicit annotations) would imply due to well-defined field offsets. As a result, it makes more sense to give users the "raw" data here, which can be used however they want. Of course, this change also gives a more natural representation for `packed` types: their fields don't have alignments in any sense, so we previously set this field to `0` (which always felt hacky), while we can now use `null` instead. ## New semantics for "uninstantiable" types This branch changes the semantics of "uninstantiable" types (things like `noreturn`, that is, types which contain no values). I wasn't originally planning to do this here, but matching the semantics of master was pretty difficult because the existing semantics don't make much sense. What I've implemented is a fairly uncontroversial subset of https://github.com/ziglang/zig/issues/15909. The following types are considered uninstantiable: * `noreturn` * `union` or `union(T)` where *all* field types are uninstantiable * `struct` where *any* field type is uninstantiable * `[n]T` or `@Vector(n, T)` where `T` is uninstantiable and `n` is non-zero Notably, this does not include `enum {}` or `error {}`, because those types raise weird questions regarding in-memory layout (related: https://github.com/ziglang/zig/issues/19855). `extern` and `packed` types are also excluded for now, because they introduce weird inconsistencies. The only specific language rule here is that `extern union`s and `packed union`s cannot have zero fields: the fact that all `extern` and `packed` types are therefore instantiable just pops out as a natural result of that. Attempting to coerce `undefined` to an uninstantiable type will result in a compile error, just like how coercing `undefined` specifically to `noreturn` is already a compile error on master. There aren't many user-facing side effects to this change. One nice one is that the "impossible branch of `switch` on `union` is not analyzed" feature, useful when a build option changes something to `noreturn` to represent an option being compiled out now works in more cases, such as when the union payload is a struct which *itself* contains the `noreturn` type: ```zig const enable_foo = false; const FooPtr = if (enable_foo) *struct {} else noreturn; const U = union(enum) { foo: struct { ctx: FooPtr }, bar: struct { something: u32 }, fn doSomething(u: U) void { switch (u) { .foo => { if (!enable_foo) @compileError("should not be analyzed"); // ... }, .bar => { // ... }, } } }; comptime { _ = &U.doSomething; } ``` ## LLVM debug information enhancements I got briefly sidetracked while working on this branch by the debug information emitted by the LLVM backend, specifically with regard to type information---I was updating the backend to work with the new compiler internals and couldn't resist making some enhancements. In no particular order: * Error sets are now lowered as enums (or rather as aliases to one enum, `anyerror`), so error values will appear by name in debuggers rather than as meaningless numbers * Unions with zero-bit payloads now actually work * All types are now named correctly (so you'll never see weird generated C/C++-style type names) ## Removed deprecated `ArrayList` default values The default field values in `std.ArrayList` were deprecated almost a year ago, which is long enough that I can remove them. I originally removed these to solve some dependency loops; those dependency loops wouldn't actually happen on the final version of this branch, but there's no point re-adding the deprecated default values when I already migrated away from them. If you get compile errors due to this, you probably just need to change `.{}` to `.empty`. # Compiler Performance Measurements I tested compiling Hello World, the standard library tests, Andrew's Tetris demo, and ZLS. All tests were run on 4 different compilers (master ReleaseSafe, this branch ReleaseSafe, master ReleaseFast, and this branch ReleaseFast), and were run both with the self-hosted x86_64 backend and with `-fno-emit-bin`. I used [`poop`](https://github.com/andrewrk/poop) to take these measurements. Because this branch makes breaking language changes, the standard library is necessarily different between master branch's compilers and this branch's compilers. However, I haven't modified std too significantly in this branch, so I don't expect that to have affected the results much. Change in peak RSS was usually statistically insignificant. Otherwise, it was slightly better on this branch than on master. If an improvement was seen it was usually around 2%, though two benchmarks saw an improvement of around 7%. The more interesting number is wall-clock time. Here's a table summarizing the changes in wall-clock time against master branch: | | hello world | std tests | tetris | zls | |--------------------|-------------------:|-------------------:|-------------------:|-------------------:| | ReleaseSafe x86_64 | 💩 + 11.9% ± 0.5% | - 1.4% ± 1.0% | 💩 + 10.4% ± 0.6% | 💩 + 24.6% ± 1.2% | | ReleaseSafe no-bin | - 0.5% ± 0.4% | ⚡ - 6.6% ± 1.0% | - 0.2% ± 0.5% | - 1.0% ± 0.5% | | ReleaseFast x86_64 | ⚡ - 12.7% ± 0.5% | ⚡ - 12.0% ± 6.2% | ⚡ - 12.0% ± 0.5% | ⚡ - 13.5% ± 0.5% | | ReleaseFast no-bin | ⚡ - 2.7% ± 0.4% | ⚡ - 8.8% ± 0.7% | ⚡ - 2.6% ± 0.4% | ⚡ - 5.0% ± 0.7% | It seems that ReleaseSafe compilers are usually a bit slower when emitting a binary (at worst 25%, usually around 10%), and are pretty much on-par with `-fno-emit-bin`; while ReleaseFast compilers are faster across the board, with a typical speed-up of 12% when emitting a binary and ~5% with `-fno-emit-bin`. <details> <summary>raw <code>poop</code> output</summary> ``` Benchmark 1 (47 runs): zig/master/zig-native-safe/bin/zig build-exe hello.zig measurement mean ± σ min ... max outliers delta wall_time 427ms ± 5.08ms 416ms ... 438ms 0 ( 0%) 0% peak_rss 186MB ± 488KB 185MB ... 187MB 1 ( 2%) 0% cpu_cycles 3.43G ± 21.7M 3.39G ... 3.48G 0 ( 0%) 0% instructions 6.73G ± 715K 6.73G ... 6.73G 2 ( 4%) 0% cache_references 263M ± 1.56M 259M ... 267M 0 ( 0%) 0% cache_misses 22.2M ± 334K 21.4M ... 22.8M 0 ( 0%) 0% branch_misses 18.3M ± 164K 18.0M ... 18.6M 0 ( 0%) 0% Benchmark 2 (42 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe hello.zig measurement mean ± σ min ... max outliers delta wall_time 477ms ± 5.83ms 462ms ... 492ms 0 ( 0%) 💩+ 11.9% ± 0.5% peak_rss 182MB ± 422KB 181MB ... 183MB 0 ( 0%) ⚡- 2.2% ± 0.1% cpu_cycles 3.51G ± 30.3M 3.46G ... 3.58G 0 ( 0%) 💩+ 2.4% ± 0.3% instructions 6.92G ± 842K 6.92G ... 6.93G 1 ( 2%) 💩+ 2.9% ± 0.0% cache_references 292M ± 1.70M 289M ... 298M 1 ( 2%) 💩+ 11.0% ± 0.3% cache_misses 26.4M ± 378K 25.5M ... 27.0M 0 ( 0%) 💩+ 19.2% ± 0.7% branch_misses 20.0M ± 185K 19.6M ... 20.3M 0 ( 0%) 💩+ 9.4% ± 0.4% Benchmark 1 (64 runs): zig/master/zig-native-safe/bin/zig build-exe hello.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 316ms ± 3.56ms 309ms ... 325ms 0 ( 0%) 0% peak_rss 147MB ± 310KB 146MB ... 148MB 2 ( 3%) 0% cpu_cycles 1.27G ± 12.5M 1.25G ... 1.30G 3 ( 5%) 0% instructions 2.56G ± 191K 2.56G ... 2.56G 0 ( 0%) 0% cache_references 122M ± 420K 121M ... 123M 0 ( 0%) 0% cache_misses 7.40M ± 116K 7.21M ... 7.74M 0 ( 0%) 0% branch_misses 4.48M ± 36.3K 4.42M ... 4.58M 1 ( 2%) 0% Benchmark 2 (64 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe hello.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 314ms ± 3.87ms 308ms ... 329ms 1 ( 2%) - 0.5% ± 0.4% peak_rss 144MB ± 357KB 143MB ... 145MB 0 ( 0%) ⚡- 2.3% ± 0.1% cpu_cycles 1.25G ± 14.2M 1.23G ... 1.31G 1 ( 2%) ⚡- 1.4% ± 0.4% instructions 2.61G ± 110K 2.61G ... 2.61G 14 (22%) 💩+ 1.8% ± 0.0% cache_references 124M ± 1.78M 122M ... 130M 10 (16%) 💩+ 1.8% ± 0.4% cache_misses 7.37M ± 169K 7.08M ... 8.02M 3 ( 5%) - 0.5% ± 0.7% branch_misses 5.09M ± 59.7K 5.00M ... 5.26M 1 ( 2%) 💩+ 13.7% ± 0.4% Benchmark 1 (60 runs): zig/master/zig-native-fast/bin/zig build-exe hello.zig measurement mean ± σ min ... max outliers delta wall_time 333ms ± 4.27ms 325ms ... 346ms 1 ( 2%) 0% peak_rss 160MB ± 330KB 160MB ... 161MB 0 ( 0%) 0% cpu_cycles 2.38G ± 18.0M 2.33G ... 2.42G 2 ( 3%) 0% instructions 4.09G ± 879K 4.09G ... 4.10G 3 ( 5%) 0% cache_references 178M ± 1.15M 176M ... 181M 0 ( 0%) 0% cache_misses 15.9M ± 313K 15.1M ... 16.5M 1 ( 2%) 0% branch_misses 14.9M ± 151K 14.5M ... 15.2M 2 ( 3%) 0% Benchmark 2 (69 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe hello.zig measurement mean ± σ min ... max outliers delta wall_time 291ms ± 4.96ms 279ms ... 302ms 0 ( 0%) ⚡- 12.7% ± 0.5% peak_rss 160MB ± 274KB 159MB ... 161MB 2 ( 3%) - 0.4% ± 0.1% cpu_cycles 2.23G ± 29.3M 2.15G ... 2.29G 0 ( 0%) ⚡- 6.2% ± 0.4% instructions 3.96G ± 683K 3.96G ... 3.97G 5 ( 7%) ⚡- 3.2% ± 0.0% cache_references 176M ± 1.90M 171M ... 179M 1 ( 1%) ⚡- 1.4% ± 0.3% cache_misses 15.0M ± 594K 13.4M ... 16.1M 0 ( 0%) ⚡- 6.0% ± 1.1% branch_misses 15.0M ± 259K 14.3M ... 15.5M 0 ( 0%) + 1.0% ± 0.5% Benchmark 1 (82 runs): zig/master/zig-native-fast/bin/zig build-exe hello.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 244ms ± 2.87ms 239ms ... 257ms 1 ( 1%) 0% peak_rss 123MB ± 202KB 122MB ... 123MB 0 ( 0%) 0% cpu_cycles 916M ± 9.16M 903M ... 961M 3 ( 4%) 0% instructions 1.55G ± 150K 1.55G ... 1.55G 0 ( 0%) 0% cache_references 82.0M ± 491K 81.0M ... 83.9M 3 ( 4%) 0% cache_misses 5.23M ± 78.4K 5.03M ... 5.42M 0 ( 0%) 0% branch_misses 4.12M ± 28.5K 4.05M ... 4.20M 6 ( 7%) 0% Benchmark 2 (85 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe hello.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 238ms ± 2.86ms 233ms ... 246ms 3 ( 4%) ⚡- 2.7% ± 0.4% peak_rss 121MB ± 166KB 121MB ... 122MB 1 ( 1%) - 1.0% ± 0.0% cpu_cycles 877M ± 9.64M 861M ... 902M 4 ( 5%) ⚡- 4.3% ± 0.3% instructions 1.46G ± 32.4K 1.46G ... 1.46G 2 ( 2%) ⚡- 5.6% ± 0.0% cache_references 82.2M ± 365K 81.4M ... 83.4M 1 ( 1%) + 0.3% ± 0.2% cache_misses 5.62M ± 97.6K 5.39M ... 6.01M 2 ( 2%) 💩+ 7.6% ± 0.5% branch_misses 4.83M ± 29.8K 4.76M ... 4.92M 6 ( 7%) 💩+ 17.1% ± 0.2% Benchmark 1 (3 runs): zig/master/zig-native-safe/bin/zig test zig/master/lib/std/std.zig -femit-bin=t --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 17.2s ± 55.7ms 17.1s ... 17.2s 0 ( 0%) 0% peak_rss 949MB ± 6.95MB 941MB ... 955MB 0 ( 0%) 0% cpu_cycles 99.9G ± 123M 99.7G ... 100.0G 0 ( 0%) 0% instructions 232G ± 5.19M 232G ... 232G 0 ( 0%) 0% cache_references 7.47G ± 8.45M 7.47G ... 7.48G 0 ( 0%) 0% cache_misses 377M ± 2.99M 375M ... 381M 0 ( 0%) 0% branch_misses 284M ± 990K 283M ... 285M 0 ( 0%) 0% Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-safe/bin/zig test zig/lets-get-typing/lib/std/std.zig -femit-bin=t --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 16.9s ± 95.4ms 16.8s ... 17.0s 0 ( 0%) - 1.4% ± 1.0% peak_rss 946MB ± 3.27MB 944MB ... 950MB 0 ( 0%) - 0.2% ± 1.3% cpu_cycles 96.9G ± 203M 96.7G ... 97.1G 0 ( 0%) ⚡- 3.0% ± 0.4% instructions 233G ± 2.19M 233G ... 233G 0 ( 0%) + 0.2% ± 0.0% cache_references 7.65G ± 35.3M 7.61G ... 7.67G 0 ( 0%) 💩+ 2.3% ± 0.8% cache_misses 407M ± 7.38M 399M ... 414M 0 ( 0%) 💩+ 7.7% ± 3.4% branch_misses 305M ± 2.54M 303M ... 308M 0 ( 0%) 💩+ 7.4% ± 1.5% Benchmark 1 (3 runs): zig/master/zig-native-safe/bin/zig test zig/master/lib/std/std.zig -fno-emit-bin --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 15.4s ± 60.3ms 15.3s ... 15.5s 0 ( 0%) 0% peak_rss 712MB ± 256KB 712MB ... 713MB 0 ( 0%) 0% cpu_cycles 66.1G ± 261M 65.9G ... 66.4G 0 ( 0%) 0% instructions 160G ± 62.9K 160G ... 160G 0 ( 0%) 0% cache_references 5.37G ± 38.3M 5.34G ... 5.41G 0 ( 0%) 0% cache_misses 170M ± 1.82M 168M ... 172M 0 ( 0%) 0% branch_misses 104M ± 430K 104M ... 105M 0 ( 0%) 0% Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-safe/bin/zig test zig/lets-get-typing/lib/std/std.zig -fno-emit-bin --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 14.4s ± 69.0ms 14.3s ... 14.5s 0 ( 0%) ⚡- 6.6% ± 1.0% peak_rss 665MB ± 141KB 665MB ... 665MB 0 ( 0%) ⚡- 6.7% ± 0.1% cpu_cycles 61.5G ± 235M 61.3G ... 61.8G 0 ( 0%) ⚡- 6.9% ± 0.9% instructions 158G ± 905K 158G ... 158G 0 ( 0%) ⚡- 1.2% ± 0.0% cache_references 5.09G ± 26.9M 5.07G ... 5.12G 0 ( 0%) ⚡- 5.2% ± 1.4% cache_misses 153M ± 2.04M 151M ... 155M 0 ( 0%) ⚡- 10.1% ± 2.6% branch_misses 110M ± 413K 109M ... 110M 0 ( 0%) 💩+ 5.2% ± 0.9% Benchmark 1 (3 runs): zig/master/zig-native-fast/bin/zig test zig/master/lib/std/std.zig -femit-bin=t --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 13.2s ± 502ms 12.8s ... 13.8s 0 ( 0%) 0% peak_rss 894MB ± 3.31MB 891MB ... 898MB 0 ( 0%) 0% cpu_cycles 70.8G ± 200M 70.7G ... 71.1G 0 ( 0%) 0% instructions 139G ± 3.28M 139G ... 139G 0 ( 0%) 0% cache_references 5.09G ± 11.7M 5.08G ... 5.10G 0 ( 0%) 0% cache_misses 266M ± 753K 265M ... 266M 0 ( 0%) 0% branch_misses 225M ± 1.45M 224M ... 226M 0 ( 0%) 0% Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-fast/bin/zig test zig/lets-get-typing/lib/std/std.zig -femit-bin=t --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 11.6s ± 81.5ms 11.5s ... 11.7s 0 ( 0%) ⚡- 12.0% ± 6.2% peak_rss 898MB ± 1.21MB 896MB ... 899MB 0 ( 0%) + 0.4% ± 0.6% cpu_cycles 64.6G ± 178M 64.5G ... 64.8G 0 ( 0%) ⚡- 8.8% ± 0.6% instructions 133G ± 3.14M 133G ... 133G 0 ( 0%) ⚡- 4.8% ± 0.0% cache_references 4.81G ± 17.3M 4.79G ... 4.82G 0 ( 0%) ⚡- 5.6% ± 0.7% cache_misses 242M ± 5.24M 236M ... 245M 0 ( 0%) ⚡- 9.1% ± 3.2% branch_misses 232M ± 1.80M 230M ... 234M 0 ( 0%) 💩+ 3.1% ± 1.6% Benchmark 1 (3 runs): zig/master/zig-native-fast/bin/zig test zig/master/lib/std/std.zig -fno-emit-bin --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 11.3s ± 42.2ms 11.3s ... 11.4s 0 ( 0%) 0% peak_rss 672MB ± 147KB 672MB ... 672MB 0 ( 0%) 0% cpu_cycles 48.2G ± 183M 48.0G ... 48.4G 0 ( 0%) 0% instructions 95.3G ± 182K 95.3G ... 95.3G 0 ( 0%) 0% cache_references 3.62G ± 29.4M 3.60G ... 3.65G 0 ( 0%) 0% cache_misses 116M ± 1.37M 115M ... 118M 0 ( 0%) 0% branch_misses 85.6M ± 614K 84.9M ... 86.1M 0 ( 0%) 0% Benchmark 2 (3 runs): zig/lets-get-typing/zig-native-fast/bin/zig test zig/lets-get-typing/lib/std/std.zig -fno-emit-bin --test-no-exec measurement mean ± σ min ... max outliers delta wall_time 10.3s ± 25.6ms 10.3s ... 10.3s 0 ( 0%) ⚡- 8.8% ± 0.7% peak_rss 621MB ± 77.8KB 621MB ... 621MB 0 ( 0%) ⚡- 7.6% ± 0.0% cpu_cycles 43.8G ± 113M 43.7G ... 43.9G 0 ( 0%) ⚡- 9.1% ± 0.7% instructions 89.4G ± 472K 89.4G ... 89.4G 0 ( 0%) ⚡- 6.2% ± 0.0% cache_references 3.43G ± 17.1M 3.41G ... 3.44G 0 ( 0%) ⚡- 5.2% ± 1.5% cache_misses 118M ± 318K 118M ... 118M 0 ( 0%) + 1.3% ± 1.9% branch_misses 102M ± 575K 102M ... 103M 0 ( 0%) 💩+ 19.5% ± 1.6% Benchmark 1 (46 runs): zig/master/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig measurement mean ± σ min ... max outliers delta wall_time 440ms ± 5.39ms 430ms ... 455ms 1 ( 2%) 0% peak_rss 203MB ± 591KB 202MB ... 205MB 0 ( 0%) 0% cpu_cycles 3.35G ± 24.8M 3.30G ... 3.42G 2 ( 4%) 0% instructions 6.57G ± 480K 6.57G ... 6.57G 0 ( 0%) 0% cache_references 251M ± 1.46M 248M ... 254M 0 ( 0%) 0% cache_misses 21.5M ± 402K 20.6M ... 22.2M 0 ( 0%) 0% branch_misses 17.8M ± 205K 17.4M ... 18.3M 0 ( 0%) 0% Benchmark 2 (42 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig measurement mean ± σ min ... max outliers delta wall_time 486ms ± 6.04ms 477ms ... 501ms 0 ( 0%) 💩+ 10.4% ± 0.6% peak_rss 201MB ± 369KB 200MB ... 202MB 1 ( 2%) ⚡- 1.3% ± 0.1% cpu_cycles 3.43G ± 32.2M 3.37G ... 3.51G 3 ( 7%) 💩+ 2.3% ± 0.4% instructions 6.74G ± 538K 6.74G ... 6.74G 0 ( 0%) 💩+ 2.6% ± 0.0% cache_references 279M ± 1.82M 276M ... 284M 1 ( 2%) 💩+ 10.9% ± 0.3% cache_misses 25.3M ± 393K 24.8M ... 26.3M 0 ( 0%) 💩+ 17.8% ± 0.8% branch_misses 19.3M ± 177K 19.0M ... 19.7M 0 ( 0%) 💩+ 8.3% ± 0.5% Benchmark 1 (61 runs): zig/master/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 331ms ± 4.18ms 323ms ... 344ms 1 ( 2%) 0% peak_rss 162MB ± 398KB 161MB ... 163MB 0 ( 0%) 0% cpu_cycles 1.25G ± 16.4M 1.23G ... 1.29G 0 ( 0%) 0% instructions 2.53G ± 77.3K 2.53G ... 2.53G 0 ( 0%) 0% cache_references 116M ± 485K 115M ... 118M 1 ( 2%) 0% cache_misses 7.42M ± 126K 7.21M ... 7.91M 3 ( 5%) 0% branch_misses 4.56M ± 41.6K 4.50M ... 4.73M 1 ( 2%) 0% Benchmark 2 (61 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 330ms ± 5.66ms 321ms ... 354ms 2 ( 3%) - 0.2% ± 0.5% peak_rss 160MB ± 372KB 159MB ... 161MB 1 ( 2%) ⚡- 1.5% ± 0.1% cpu_cycles 1.24G ± 20.3M 1.22G ... 1.33G 2 ( 3%) - 1.5% ± 0.5% instructions 2.55G ± 129K 2.55G ... 2.55G 16 (26%) 💩+ 1.1% ± 0.0% cache_references 117M ± 1.14M 116M ... 121M 6 (10%) 💩+ 1.3% ± 0.3% cache_misses 7.40M ± 253K 7.15M ... 8.72M 2 ( 3%) - 0.3% ± 1.0% branch_misses 5.12M ± 80.5K 5.03M ... 5.46M 3 ( 5%) 💩+ 12.3% ± 0.5% Benchmark 1 (58 runs): zig/master/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig measurement mean ± σ min ... max outliers delta wall_time 350ms ± 4.45ms 341ms ... 366ms 1 ( 2%) 0% peak_rss 175MB ± 348KB 175MB ... 176MB 0 ( 0%) 0% cpu_cycles 2.34G ± 21.7M 2.29G ... 2.43G 1 ( 2%) 0% instructions 3.98G ± 717K 3.98G ... 3.98G 2 ( 3%) 0% cache_references 171M ± 936K 169M ... 174M 0 ( 0%) 0% cache_misses 15.6M ± 276K 14.9M ... 16.3M 1 ( 2%) 0% branch_misses 14.6M ± 126K 14.3M ... 14.9M 1 ( 2%) 0% Benchmark 2 (65 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig measurement mean ± σ min ... max outliers delta wall_time 308ms ± 4.88ms 300ms ... 323ms 1 ( 2%) ⚡- 12.0% ± 0.5% peak_rss 175MB ± 341KB 174MB ... 176MB 0 ( 0%) - 0.1% ± 0.1% cpu_cycles 2.18G ± 28.2M 2.13G ... 2.25G 0 ( 0%) ⚡- 6.9% ± 0.4% instructions 3.85G ± 619K 3.85G ... 3.85G 1 ( 2%) ⚡- 3.2% ± 0.0% cache_references 167M ± 1.57M 163M ... 171M 1 ( 2%) ⚡- 2.4% ± 0.3% cache_misses 14.4M ± 453K 13.4M ... 15.2M 0 ( 0%) ⚡- 7.7% ± 0.9% branch_misses 14.6M ± 209K 14.1M ... 15.0M 0 ( 0%) + 0.1% ± 0.4% Benchmark 1 (77 runs): zig/master/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 260ms ± 3.71ms 253ms ... 269ms 0 ( 0%) 0% peak_rss 135MB ± 184KB 135MB ... 136MB 1 ( 1%) 0% cpu_cycles 917M ± 13.8M 895M ... 962M 7 ( 9%) 0% instructions 1.51G ± 33.6K 1.51G ... 1.51G 0 ( 0%) 0% cache_references 77.1M ± 368K 76.4M ... 78.3M 1 ( 1%) 0% cache_misses 5.27M ± 88.5K 5.10M ... 5.53M 0 ( 0%) 0% branch_misses 4.21M ± 31.8K 4.15M ... 4.31M 1 ( 1%) 0% Benchmark 2 (79 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe -lglfw -lepoxy -lc src/main.zig -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 253ms ± 3.29ms 246ms ... 264ms 1 ( 1%) ⚡- 2.6% ± 0.4% peak_rss 135MB ± 192KB 134MB ... 135MB 0 ( 0%) - 0.4% ± 0.0% cpu_cycles 878M ± 11.7M 859M ... 909M 0 ( 0%) ⚡- 4.3% ± 0.4% instructions 1.43G ± 73.5K 1.43G ... 1.43G 13 (16%) ⚡- 5.6% ± 0.0% cache_references 77.4M ± 546K 76.6M ... 79.3M 3 ( 4%) + 0.5% ± 0.2% cache_misses 5.64M ± 123K 5.39M ... 6.26M 1 ( 1%) 💩+ 7.0% ± 0.6% branch_misses 4.85M ± 36.3K 4.79M ... 5.05M 4 ( 5%) 💩+ 15.2% ± 0.3% Benchmark 1 (12 runs): zig/master/zig-native-safe/bin/zig build-exe [...] measurement mean ± σ min ... max outliers delta wall_time 2.54s ± 34.9ms 2.50s ... 2.62s 0 ( 0%) 0% peak_rss 341MB ± 703KB 339MB ... 342MB 2 (17%) 0% cpu_cycles 21.5G ± 250M 21.3G ... 22.2G 1 ( 8%) 0% instructions 42.8G ± 1.34M 42.8G ... 42.8G 1 ( 8%) 0% cache_references 1.61G ± 9.58M 1.60G ... 1.63G 1 ( 8%) 0% cache_misses 130M ± 2.62M 126M ... 136M 1 ( 8%) 0% branch_misses 105M ± 745K 104M ... 106M 0 ( 0%) 0% Benchmark 2 (10 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe [...] measurement mean ± σ min ... max outliers delta wall_time 3.17s ± 35.7ms 3.13s ... 3.23s 0 ( 0%) 💩+ 24.6% ± 1.2% peak_rss 335MB ± 569KB 334MB ... 336MB 1 (10%) ⚡- 1.6% ± 0.2% cpu_cycles 22.8G ± 336M 22.5G ... 23.4G 0 ( 0%) 💩+ 5.9% ± 1.2% instructions 44.8G ± 5.17M 44.8G ... 44.8G 0 ( 0%) 💩+ 4.5% ± 0.0% cache_references 1.83G ± 12.3M 1.81G ... 1.85G 0 ( 0%) 💩+ 13.7% ± 0.6% cache_misses 166M ± 2.53M 161M ... 169M 0 ( 0%) 💩+ 27.3% ± 1.8% branch_misses 120M ± 734K 119M ... 121M 0 ( 0%) 💩+ 14.4% ± 0.6% Benchmark 1 (16 runs): zig/master/zig-native-safe/bin/zig build-exe [...] -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 1.94s ± 8.64ms 1.92s ... 1.95s 0 ( 0%) 0% peak_rss 202MB ± 429KB 201MB ... 203MB 2 (13%) 0% cpu_cycles 8.29G ± 36.4M 8.23G ... 8.36G 0 ( 0%) 0% instructions 17.2G ± 853K 17.2G ... 17.2G 0 ( 0%) 0% cache_references 782M ± 2.78M 779M ... 790M 2 (13%) 0% cache_misses 40.5M ± 720K 38.8M ... 41.5M 0 ( 0%) 0% branch_misses 24.2M ± 141K 24.1M ... 24.5M 0 ( 0%) 0% Benchmark 2 (16 runs): zig/lets-get-typing/zig-native-safe/bin/zig build-exe [...] -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 1.92s ± 15.5ms 1.90s ... 1.97s 2 (13%) - 1.0% ± 0.5% peak_rss 202MB ± 426KB 201MB ... 203MB 0 ( 0%) + 0.2% ± 0.2% cpu_cycles 8.14G ± 64.6M 8.07G ... 8.37G 2 (13%) ⚡- 1.8% ± 0.5% instructions 17.7G ± 361K 17.7G ... 17.7G 0 ( 0%) 💩+ 3.1% ± 0.0% cache_references 774M ± 5.09M 768M ... 788M 1 ( 6%) - 1.0% ± 0.4% cache_misses 41.1M ± 1.62M 39.4M ... 46.7M 1 ( 6%) + 1.6% ± 2.2% branch_misses 27.6M ± 377K 27.4M ... 29.0M 1 ( 6%) 💩+ 14.0% ± 0.8% Benchmark 1 (16 runs): zig/master/zig-native-fast/bin/zig build-exe [...] measurement mean ± σ min ... max outliers delta wall_time 1.92s ± 14.2ms 1.90s ... 1.96s 0 ( 0%) 0% peak_rss 305MB ± 614KB 304MB ... 306MB 0 ( 0%) 0% cpu_cycles 14.8G ± 70.3M 14.7G ... 15.0G 0 ( 0%) 0% instructions 25.9G ± 1.43M 25.9G ... 25.9G 0 ( 0%) 0% cache_references 1.09G ± 4.82M 1.08G ... 1.10G 0 ( 0%) 0% cache_misses 91.2M ± 1.51M 86.8M ... 92.9M 1 ( 6%) 0% branch_misses 83.8M ± 715K 82.2M ... 85.1M 0 ( 0%) 0% Benchmark 2 (19 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe [...] measurement mean ± σ min ... max outliers delta wall_time 1.66s ± 13.9ms 1.64s ... 1.69s 0 ( 0%) ⚡- 13.5% ± 0.5% peak_rss 302MB ± 335KB 302MB ... 303MB 0 ( 0%) - 0.8% ± 0.1% cpu_cycles 13.6G ± 95.0M 13.5G ... 13.8G 0 ( 0%) ⚡- 8.2% ± 0.4% instructions 25.0G ± 1.44M 25.0G ... 25.0G 1 ( 5%) ⚡- 3.5% ± 0.0% cache_references 1.04G ± 4.92M 1.03G ... 1.05G 0 ( 0%) ⚡- 3.9% ± 0.3% cache_misses 82.1M ± 1.62M 79.6M ... 86.5M 1 ( 5%) ⚡- 10.0% ± 1.2% branch_misses 83.2M ± 935K 81.7M ... 85.2M 2 (11%) - 0.7% ± 0.7% Benchmark 1 (21 runs): zig/master/zig-native-fast/bin/zig build-exe [...] -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 1.44s ± 19.6ms 1.42s ... 1.52s 1 ( 5%) 0% peak_rss 171MB ± 249KB 171MB ... 172MB 0 ( 0%) 0% cpu_cycles 6.05G ± 87.7M 5.99G ... 6.41G 1 ( 5%) 0% instructions 10.4G ± 837K 10.4G ... 10.4G 0 ( 0%) 0% cache_references 527M ± 10.7M 522M ... 572M 2 (10%) 0% cache_misses 28.3M ± 639K 27.4M ... 30.4M 1 ( 5%) 0% branch_misses 22.0M ± 157K 21.7M ... 22.4M 2 (10%) 0% Benchmark 2 (22 runs): zig/lets-get-typing/zig-native-fast/bin/zig build-exe [...] -fno-emit-bin measurement mean ± σ min ... max outliers delta wall_time 1.37s ± 14.4ms 1.35s ... 1.40s 0 ( 0%) ⚡- 5.0% ± 0.7% peak_rss 172MB ± 191KB 171MB ... 172MB 0 ( 0%) + 0.2% ± 0.1% cpu_cycles 5.67G ± 45.3M 5.61G ... 5.78G 0 ( 0%) ⚡- 6.2% ± 0.7% instructions 9.83G ± 357K 9.83G ... 9.84G 0 ( 0%) ⚡- 5.3% ± 0.0% cache_references 516M ± 3.02M 513M ... 523M 3 (14%) ⚡- 2.2% ± 0.9% cache_misses 31.0M ± 871K 29.8M ... 33.4M 1 ( 5%) 💩+ 9.8% ± 1.7% branch_misses 26.4M ± 323K 26.1M ... 27.4M 3 (14%) 💩+ 19.9% ± 0.7% ``` </summary>
mlugg force-pushed lets-get-typing from 3115cadc43
Some checks failed
ci / x86_64-freebsd-release (pull_request) Failing after 22m45s
ci / x86_64-netbsd-release (pull_request) Failing after 23m44s
ci / x86_64-openbsd-release (pull_request) Failing after 29m42s
ci / x86_64-freebsd-debug (pull_request) Failing after 33m14s
ci / aarch64-macos-release (pull_request) Failing after 35m26s
ci / x86_64-netbsd-debug (pull_request) Failing after 35m27s
ci / x86_64-windows-release (pull_request) Failing after 40m54s
ci / x86_64-openbsd-debug (pull_request) Failing after 42m55s
ci / aarch64-macos-debug (pull_request) Failing after 52m0s
ci / x86_64-windows-debug (pull_request) Failing after 1h3m3s
ci / x86_64-linux-debug (pull_request) Failing after 1h11m22s
ci / powerpc64le-linux-release (pull_request) Failing after 1h14m6s
ci / x86_64-linux-release (pull_request) Failing after 1h17m50s
ci / s390x-linux-release (pull_request) Successful in 1h19m19s
ci / aarch64-linux-release (pull_request) Successful in 1h24m40s
ci / aarch64-linux-debug (pull_request) Successful in 2h26m49s
ci / s390x-linux-debug (pull_request) Successful in 3h6m24s
ci / x86_64-linux-debug-llvm (pull_request) Failing after 3h31m58s
ci / powerpc64le-linux-debug (pull_request) Failing after 4h17m46s
ci / loongarch64-linux-release (pull_request) Successful in 1h53m6s
ci / loongarch64-linux-debug (pull_request) Failing after 2h27m10s
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
to 329fa734d0
Some checks failed
ci / x86_64-freebsd-release (pull_request) Successful in 30m17s
ci / x86_64-netbsd-release (pull_request) Successful in 31m22s
ci / x86_64-netbsd-debug (pull_request) Successful in 39m28s
ci / x86_64-freebsd-debug (pull_request) Successful in 39m52s
ci / aarch64-macos-release (pull_request) Successful in 44m34s
ci / x86_64-openbsd-release (pull_request) Successful in 48m48s
ci / x86_64-openbsd-debug (pull_request) Successful in 58m3s
ci / aarch64-macos-debug (pull_request) Successful in 1h0m37s
ci / x86_64-windows-debug (pull_request) Failing after 1h4m10s
ci / x86_64-windows-release (pull_request) Failing after 1h6m3s
ci / s390x-linux-release (pull_request) Successful in 1h18m52s
ci / aarch64-linux-release (pull_request) Successful in 1h28m32s
ci / x86_64-linux-debug (pull_request) Successful in 1h33m52s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 2h16m18s
ci / x86_64-linux-release (pull_request) Successful in 2h17m24s
ci / powerpc64le-linux-release (pull_request) Successful in 1h13m8s
ci / s390x-linux-debug (pull_request) Successful in 2h23m6s
ci / aarch64-linux-debug (pull_request) Successful in 2h35m37s
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
2026年03月06日 13:47:49 +01:00
Compare
mlugg force-pushed lets-get-typing from 329fa734d0
Some checks failed
ci / x86_64-freebsd-release (pull_request) Successful in 30m17s
ci / x86_64-netbsd-release (pull_request) Successful in 31m22s
ci / x86_64-netbsd-debug (pull_request) Successful in 39m28s
ci / x86_64-freebsd-debug (pull_request) Successful in 39m52s
ci / aarch64-macos-release (pull_request) Successful in 44m34s
ci / x86_64-openbsd-release (pull_request) Successful in 48m48s
ci / x86_64-openbsd-debug (pull_request) Successful in 58m3s
ci / aarch64-macos-debug (pull_request) Successful in 1h0m37s
ci / x86_64-windows-debug (pull_request) Failing after 1h4m10s
ci / x86_64-windows-release (pull_request) Failing after 1h6m3s
ci / s390x-linux-release (pull_request) Successful in 1h18m52s
ci / aarch64-linux-release (pull_request) Successful in 1h28m32s
ci / x86_64-linux-debug (pull_request) Successful in 1h33m52s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 2h16m18s
ci / x86_64-linux-release (pull_request) Successful in 2h17m24s
ci / powerpc64le-linux-release (pull_request) Successful in 1h13m8s
ci / s390x-linux-debug (pull_request) Successful in 2h23m6s
ci / aarch64-linux-debug (pull_request) Successful in 2h35m37s
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
to 1431446044
All checks were successful
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-netbsd-release (pull_request) Successful in 31m50s
ci / x86_64-freebsd-release (pull_request) Successful in 31m42s
ci / aarch64-macos-release (pull_request) Successful in 36m52s
ci / x86_64-netbsd-debug (pull_request) Successful in 37m59s
ci / x86_64-freebsd-debug (pull_request) Successful in 38m5s
ci / x86_64-openbsd-release (pull_request) Successful in 44m34s
ci / x86_64-openbsd-debug (pull_request) Successful in 50m4s
ci / x86_64-windows-release (pull_request) Successful in 52m36s
ci / aarch64-macos-debug (pull_request) Successful in 1h2m48s
ci / x86_64-windows-debug (pull_request) Successful in 1h3m39s
ci / x86_64-linux-debug (pull_request) Successful in 1h15m54s
ci / powerpc64le-linux-release (pull_request) Successful in 1h21m48s
ci / aarch64-linux-release (pull_request) Successful in 1h25m37s
ci / s390x-linux-release (pull_request) Successful in 1h36m45s
ci / aarch64-linux-debug (pull_request) Successful in 2h29m21s
ci / s390x-linux-debug (pull_request) Successful in 2h32m47s
ci / loongarch64-linux-release (pull_request) Successful in 1h50m36s
ci / loongarch64-linux-debug (pull_request) Successful in 2h56m46s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h18m4s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h7m33s
ci / aarch64-netbsd-release (pull_request) Successful in 2h52m10s
ci / aarch64-netbsd-debug (pull_request) Successful in 3h35m33s
ci / aarch64-freebsd-release (pull_request) Successful in 2h28m31s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h34m42s
ci / x86_64-linux-release (pull_request) Successful in 2h5m8s
2026年03月06日 18:03:38 +01:00
Compare
mlugg changed title from (削除) a small handful of inconsequential tweaks to type resolution (削除ここまで) to compiler: rework type resolution 2026年03月06日 18:27:13 +01:00
Author
Owner
Copy link

It looks like the x86_64-linux release failure we're seeing on zanic (but not carmen) is https://github.com/ziglang/zig/issues/18775, because zanic has vm.max_map_count = 65530 while carmen has vm.max_map_count = 1048576 (this is because Debian Trixie increased the default, a change which many Linux distributions are beginning to make). I must have changed allocation patterns just enough to start triggering that bug again in certain cases.

IIUC we've still not quite decided how we want to solve that issue. For now I'm going to work around it by slightly increasing the value of vm.max_map_count on zanic and ziggy (I'm just now searching for a value that works). Even if we decide we don't want to merge with that workaround in place, it'll help me verify there are no other lingering CI failures (plus I get the euphoria of seeing a green tick on a +30k -30k diff).

For the record, I don't expect users would hit this. Even ignoring the fact that many systems default to larger values of vm.max_map_count nowadays, I don't believe I have actually changed the compiler's mmap characteristics that much---rather, I suspect we were just close to the limit for this command anyway. Plus, the x86_64 behavior tests are an extremely unusual workload for the compiler, emitting hundreds of thousands of tiny generic function instances.


EDIT: I've set vm.max_map_count = 80000 in /etc/sysctl.conf on zanic and ziggy. Re-running the x86_64-linux-release job now to check that this does indeed work around the failures.

EDIT 2: I canceled and retried the job a few times but neither zanic nor ziggy was ever the runner to pick it up, so I think we just have to assume for now that the config change works. I'll end up re-pushing with some new tests at some point soon, so we'll hopefully be able to see then.

It looks like the x86_64-linux release failure we're seeing on zanic (but not carmen) is https://github.com/ziglang/zig/issues/18775, because zanic has `vm.max_map_count = 65530` while carmen has `vm.max_map_count = 1048576` (this is because Debian Trixie increased the default, a change which many Linux distributions are beginning to make). I must have changed allocation patterns just enough to start triggering that bug again in certain cases. IIUC we've still not quite decided how we want to solve that issue. For now I'm going to work around it by slightly increasing the value of `vm.max_map_count` on zanic and ziggy (I'm just now searching for a value that works). Even if we decide we don't want to merge with that workaround in place, it'll help me verify there are no other lingering CI failures (plus I get the euphoria of seeing a green tick on a +30k -30k diff). For the record, I don't expect users would hit this. Even ignoring the fact that many systems default to larger values of `vm.max_map_count` nowadays, I don't believe I have actually changed the compiler's mmap characteristics *that* much---rather, I suspect we were just close to the limit for this command anyway. Plus, the x86_64 behavior tests are an extremely unusual workload for the compiler, emitting hundreds of thousands of tiny generic function instances. --- EDIT: I've set `vm.max_map_count = 80000` in `/etc/sysctl.conf` on zanic and ziggy. Re-running the x86_64-linux-release job now to check that this does indeed work around the failures. EDIT 2: I canceled and retried the job a few times but neither zanic nor ziggy was ever the runner to pick it up, so I think we just have to assume for now that the config change works. I'll end up re-pushing with some new tests at some point soon, so we'll hopefully be able to see then.
mlugg force-pushed lets-get-typing from 1431446044
All checks were successful
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-netbsd-release (pull_request) Successful in 31m50s
ci / x86_64-freebsd-release (pull_request) Successful in 31m42s
ci / aarch64-macos-release (pull_request) Successful in 36m52s
ci / x86_64-netbsd-debug (pull_request) Successful in 37m59s
ci / x86_64-freebsd-debug (pull_request) Successful in 38m5s
ci / x86_64-openbsd-release (pull_request) Successful in 44m34s
ci / x86_64-openbsd-debug (pull_request) Successful in 50m4s
ci / x86_64-windows-release (pull_request) Successful in 52m36s
ci / aarch64-macos-debug (pull_request) Successful in 1h2m48s
ci / x86_64-windows-debug (pull_request) Successful in 1h3m39s
ci / x86_64-linux-debug (pull_request) Successful in 1h15m54s
ci / powerpc64le-linux-release (pull_request) Successful in 1h21m48s
ci / aarch64-linux-release (pull_request) Successful in 1h25m37s
ci / s390x-linux-release (pull_request) Successful in 1h36m45s
ci / aarch64-linux-debug (pull_request) Successful in 2h29m21s
ci / s390x-linux-debug (pull_request) Successful in 2h32m47s
ci / loongarch64-linux-release (pull_request) Successful in 1h50m36s
ci / loongarch64-linux-debug (pull_request) Successful in 2h56m46s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h18m4s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h7m33s
ci / aarch64-netbsd-release (pull_request) Successful in 2h52m10s
ci / aarch64-netbsd-debug (pull_request) Successful in 3h35m33s
ci / aarch64-freebsd-release (pull_request) Successful in 2h28m31s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h34m42s
ci / x86_64-linux-release (pull_request) Successful in 2h5m8s
to 9a1ab5c3c9
Some checks failed
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-freebsd-release (pull_request) Failing after 25m43s
ci / x86_64-netbsd-release (pull_request) Successful in 34m27s
ci / x86_64-freebsd-debug (pull_request) Failing after 35m51s
ci / x86_64-netbsd-debug (pull_request) Successful in 39m52s
ci / aarch64-macos-release (pull_request) Successful in 40m27s
ci / x86_64-openbsd-release (pull_request) Successful in 43m38s
ci / x86_64-windows-release (pull_request) Failing after 46m21s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
2026年03月08日 17:27:05 +01:00
Compare
Contributor
Copy link
https://github.com/ziglang/zig/issues/21222 https://github.com/ziglang/zig/issues/22986 https://github.com/ziglang/zig/issues/23222 are all fixed on this branch as well
mlugg force-pushed lets-get-typing from 9a1ab5c3c9
Some checks failed
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-freebsd-release (pull_request) Failing after 25m43s
ci / x86_64-netbsd-release (pull_request) Successful in 34m27s
ci / x86_64-freebsd-debug (pull_request) Failing after 35m51s
ci / x86_64-netbsd-debug (pull_request) Successful in 39m52s
ci / aarch64-macos-release (pull_request) Successful in 40m27s
ci / x86_64-openbsd-release (pull_request) Successful in 43m38s
ci / x86_64-windows-release (pull_request) Failing after 46m21s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
to d78bc22d8a
Some checks failed
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-linux-release (pull_request) Failing after 33m21s
ci / x86_64-freebsd-release (pull_request) Successful in 33m28s
ci / x86_64-netbsd-release (pull_request) Successful in 38m10s
ci / aarch64-macos-release (pull_request) Successful in 41m36s
ci / x86_64-freebsd-debug (pull_request) Successful in 47m50s
ci / x86_64-netbsd-debug (pull_request) Successful in 47m59s
ci / x86_64-openbsd-release (pull_request) Successful in 1h3m26s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h9m8s
ci / x86_64-windows-release (pull_request) Successful in 1h13m29s
ci / x86_64-windows-debug (pull_request) Successful in 1h14m27s
ci / s390x-linux-release (pull_request) Failing after 1h16m11s
ci / aarch64-macos-debug (pull_request) Successful in 1h20m1s
ci / aarch64-linux-release (pull_request) Successful in 1h27m16s
ci / x86_64-linux-debug (pull_request) Successful in 1h29m37s
ci / powerpc64le-linux-release (pull_request) Successful in 1h32m45s
ci / loongarch64-linux-release (pull_request) Successful in 1h53m29s
ci / s390x-linux-debug (pull_request) Failing after 2h1m25s
ci / aarch64-netbsd-release (pull_request) Successful in 2h46m11s
ci / aarch64-linux-debug (pull_request) Successful in 2h48m48s
ci / aarch64-freebsd-release (pull_request) Successful in 2h55m3s
ci / loongarch64-linux-debug (pull_request) Successful in 3h13m34s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h49m46s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h50m37s
ci / aarch64-netbsd-debug (pull_request) Successful in 3h59m33s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h46m59s
2026年03月08日 18:17:30 +01:00
Compare
mlugg force-pushed lets-get-typing from d78bc22d8a
Some checks failed
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-linux-release (pull_request) Failing after 33m21s
ci / x86_64-freebsd-release (pull_request) Successful in 33m28s
ci / x86_64-netbsd-release (pull_request) Successful in 38m10s
ci / aarch64-macos-release (pull_request) Successful in 41m36s
ci / x86_64-freebsd-debug (pull_request) Successful in 47m50s
ci / x86_64-netbsd-debug (pull_request) Successful in 47m59s
ci / x86_64-openbsd-release (pull_request) Successful in 1h3m26s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h9m8s
ci / x86_64-windows-release (pull_request) Successful in 1h13m29s
ci / x86_64-windows-debug (pull_request) Successful in 1h14m27s
ci / s390x-linux-release (pull_request) Failing after 1h16m11s
ci / aarch64-macos-debug (pull_request) Successful in 1h20m1s
ci / aarch64-linux-release (pull_request) Successful in 1h27m16s
ci / x86_64-linux-debug (pull_request) Successful in 1h29m37s
ci / powerpc64le-linux-release (pull_request) Successful in 1h32m45s
ci / loongarch64-linux-release (pull_request) Successful in 1h53m29s
ci / s390x-linux-debug (pull_request) Failing after 2h1m25s
ci / aarch64-netbsd-release (pull_request) Successful in 2h46m11s
ci / aarch64-linux-debug (pull_request) Successful in 2h48m48s
ci / aarch64-freebsd-release (pull_request) Successful in 2h55m3s
ci / loongarch64-linux-debug (pull_request) Successful in 3h13m34s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h49m46s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h50m37s
ci / aarch64-netbsd-debug (pull_request) Successful in 3h59m33s
ci / powerpc64le-linux-debug (pull_request) Successful in 4h46m59s
to bd46a9e5a9
Some checks failed
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-freebsd-release (pull_request) Successful in 31m18s
ci / x86_64-netbsd-release (pull_request) Successful in 34m0s
ci / x86_64-netbsd-debug (pull_request) Successful in 41m37s
ci / x86_64-freebsd-debug (pull_request) Successful in 42m16s
ci / aarch64-macos-release (pull_request) Successful in 45m30s
ci / x86_64-openbsd-release (pull_request) Successful in 47m20s
ci / x86_64-windows-release (pull_request) Successful in 51m54s
ci / aarch64-macos-debug (pull_request) Failing after 52m27s
ci / x86_64-openbsd-debug (pull_request) Successful in 56m11s
ci / x86_64-windows-debug (pull_request) Successful in 1h5m51s
ci / powerpc64le-linux-release (pull_request) Successful in 1h21m33s
ci / aarch64-linux-release (pull_request) Successful in 1h28m24s
ci / s390x-linux-release (pull_request) Successful in 1h45m2s
ci / x86_64-linux-debug (pull_request) Successful in 1h47m26s
ci / aarch64-linux-debug (pull_request) Successful in 2h31m27s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
2026年03月09日 10:41:12 +01:00
Compare
Contributor
Copy link

#31350
#30088
#31013
are also fixed by this!

https://codeberg.org/ziglang/zig/issues/31350 https://codeberg.org/ziglang/zig/issues/30088 https://codeberg.org/ziglang/zig/issues/31013 are also fixed by this!
Contributor
Copy link

Two more fixed!
https://github.com/ziglang/zig/issues/22742
https://github.com/ziglang/zig/issues/24071 (would crash, now dependency loop. Maybe you'd want to double check this is intended).

Two more fixed! https://github.com/ziglang/zig/issues/22742 https://github.com/ziglang/zig/issues/24071 (would crash, now dependency loop. Maybe you'd want to double check this is intended).
mlugg force-pushed lets-get-typing from c43ca0b66e
Some checks failed
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-freebsd-release (pull_request) Successful in 31m36s
ci / x86_64-netbsd-release (pull_request) Successful in 33m41s
ci / aarch64-macos-release (pull_request) Successful in 41m57s
ci / x86_64-netbsd-debug (pull_request) Successful in 42m51s
ci / x86_64-freebsd-debug (pull_request) Successful in 44m32s
ci / x86_64-openbsd-release (pull_request) Successful in 45m20s
ci / x86_64-windows-release (pull_request) Successful in 48m18s
ci / x86_64-openbsd-debug (pull_request) Successful in 52m17s
ci / x86_64-windows-debug (pull_request) Successful in 1h1m6s
ci / aarch64-macos-debug (pull_request) Successful in 1h2m29s
ci / x86_64-linux-debug (pull_request) Successful in 1h28m52s
ci / aarch64-linux-release (pull_request) Successful in 1h34m35s
ci / powerpc64le-linux-release (pull_request) Successful in 1h41m13s
ci / s390x-linux-release (pull_request) Successful in 1h42m25s
ci / loongarch64-linux-release (pull_request) Successful in 1h54m39s
ci / aarch64-linux-debug (pull_request) Successful in 2h33m27s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h8m11s
ci / s390x-linux-debug (pull_request) Successful in 3h18m1s
ci / loongarch64-linux-debug (pull_request) Successful in 3h31m41s
ci / x86_64-linux-release (pull_request) Successful in 4h27m30s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
to 99b1a5ac20
Some checks failed
ci / x86_64-freebsd-release (pull_request) Failing after 29m59s
ci / x86_64-netbsd-release (pull_request) Failing after 34m32s
ci / x86_64-freebsd-debug (pull_request) Failing after 36m37s
ci / aarch64-macos-release (pull_request) Failing after 37m43s
ci / x86_64-netbsd-debug (pull_request) Failing after 40m37s
ci / aarch64-macos-debug (pull_request) Failing after 48m31s
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
2026年03月10日 11:39:31 +01:00
Compare
mlugg force-pushed lets-get-typing from 99b1a5ac20
Some checks failed
ci / x86_64-freebsd-release (pull_request) Failing after 29m59s
ci / x86_64-netbsd-release (pull_request) Failing after 34m32s
ci / x86_64-freebsd-debug (pull_request) Failing after 36m37s
ci / aarch64-macos-release (pull_request) Failing after 37m43s
ci / x86_64-netbsd-debug (pull_request) Failing after 40m37s
ci / aarch64-macos-debug (pull_request) Failing after 48m31s
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
to 502cab9ae3
All checks were successful
ci / riscv64-linux-debug (pull_request) Has been skipped
ci / riscv64-linux-release (pull_request) Has been skipped
ci / x86_64-netbsd-release (pull_request) Successful in 28m23s
ci / x86_64-freebsd-release (pull_request) Successful in 33m57s
ci / aarch64-macos-release (pull_request) Successful in 42m56s
ci / x86_64-freebsd-debug (pull_request) Successful in 45m8s
ci / x86_64-openbsd-release (pull_request) Successful in 46m22s
ci / x86_64-netbsd-debug (pull_request) Successful in 47m42s
ci / x86_64-windows-release (pull_request) Successful in 50m46s
ci / x86_64-openbsd-debug (pull_request) Successful in 55m5s
ci / x86_64-windows-debug (pull_request) Successful in 58m53s
ci / aarch64-macos-debug (pull_request) Successful in 1h2m43s
ci / x86_64-linux-debug (pull_request) Successful in 1h9m23s
ci / aarch64-linux-release (pull_request) Successful in 1h27m39s
ci / s390x-linux-release (pull_request) Successful in 1h33m45s
ci / powerpc64le-linux-release (pull_request) Successful in 1h36m13s
ci / loongarch64-linux-release (pull_request) Successful in 2h8m43s
ci / aarch64-linux-debug (pull_request) Successful in 2h30m17s
ci / x86_64-linux-release (pull_request) Successful in 2h45m51s
ci / s390x-linux-debug (pull_request) Successful in 2h49m0s
ci / x86_64-linux-debug-llvm (pull_request) Successful in 3h22m55s
ci / powerpc64le-linux-debug (pull_request) Successful in 5h24m57s
ci / aarch64-freebsd-debug (pull_request) Successful in 3h21m44s
ci / aarch64-netbsd-debug (pull_request) Successful in 3h36m38s
ci / aarch64-freebsd-release (pull_request) Successful in 2h23m49s
ci / aarch64-netbsd-release (pull_request) Successful in 2h24m1s
ci / loongarch64-linux-debug (pull_request) Successful in 3h20m15s
2026年03月10日 12:28:43 +01:00
Compare
mlugg deleted branch lets-get-typing 2026年03月10日 22:06:15 +01:00
Member
Copy link

One more: https://github.com/ziglang/zig/issues/24901

Also I believe this implements https://github.com/ziglang/zig/issues/25279 at least partially

One more: https://github.com/ziglang/zig/issues/24901 Also I believe this implements https://github.com/ziglang/zig/issues/25279 at least partially

I added 4 sections to "Language Changes" in the release notes for this and then left you a TODO stub under "Compiler" for this

I added 4 sections to "Language Changes" in the release notes for this and then left you a TODO stub under "Compiler" for this
Sign in to join this conversation.
No reviewers
Labels
Clear labels
abi/f32
abi/ilp32
abi/sf
accepted
This proposal is planned.
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
The web application for interactive documentation and generation of its assets.
backend/c
The C backend outputs C source code.
backend/llvm
The LLVM backend outputs an LLVM bitcode module.
backend/self-hosted
The self-hosted backends produce machine code directly.
binutils
Zig's included binary utilities: zig ar, zig dlltool, zig lib, zig ranlib, zig objcopy, and zig rc.
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
build system
The Zig build system - zig build, std.Build, the build runner, and package management.
debug info
An issue related to debug information (e.g. DWARF) produced by the Zig compiler.
docs
An issue with documentation, e.g. the language reference or standard library doc comments.
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, ZonGen, Sema, Legalize, and Liveness.
fuzzing
An issue related to Zig's integrated fuzz testing.
incremental
Reuse of internal compiler state for faster compilation.
lib/c
This issue relates to Zig's libc implementation and/or vendored libcs.
lib/compiler-rt
This issue relates to Zig's compiler-rt library.
lib/cxx
This issue relates to Zig's vendored libc++ and/or libc++abi.
lib/std
This issue relates to Zig's standard library.
lib/tsan
This issue relates to Zig's vendored libtsan.
lib/ubsan-rt
This issue relates to Zig's ubsan-rt library.
lib/unwind
This issue relates to Zig's vendored libunwind.
linking
Zig's integrated object file and incremental linker.
miscompilation
The compiler reports success but produces semantically incorrect code.
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
This issue suggests language modifications. If it also has the "accepted" label then it is planned.
release notes
This issue or pull request should be mentioned in the release notes.
testing
This issue is related to testing the compiler, standard library, or other parts of Zig.
zig cc
Zig as a drop-in C-family compiler.
zig fmt
The Zig source code formatter.
zig reduce
The Zig source code reduction tool.
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
7 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig!31403
Reference in a new issue
ziglang/zig
No description provided.
Delete branch "lets-get-typing"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?