mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
AstGen: migrate ty result locations to coerced_ty
In most cases where AstGen is coercing to a fixed type (such as `u29`, `type`, `std.builtin.CallingConvention) we do not necessarily require an explicit coercion instruction. Instead, Sema knows the type that is required, and can perform the coercion after the fact. This means we can use the `coerced_ty` result location kind, saving unnecessary coercion instructions and therefore ZIR bytes. This required a few enhancements to Sema to introduce missing coercions.
This commit is contained in:
parent
434537213e
commit
10784c7fc8
2 changed files with 114 additions and 87 deletions
117
src/AstGen.zig
117
src/AstGen.zig
96
src/Sema.zig
96
src/Sema.zig
Loading…
Add table
Add a link
Reference in a new issue