mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-22 08:31:47 -04:00
88d2961df4
A handful of changes to get the regressed behavior tests running again. - Replace `decorateBlockOffsets` with a recursive function `decorateLayout` that walks arrays, vectors, structs, unions, optionals, and error unions, emitting `ArrayStride` and member `Offset` decorations at every level. Previously we weren't handling nested types. - Restrict `Block` decoration to struct types with `uniform`, `push_constant`, `storage_buffer` storage classes. Previously we decorated through every pointer, contaminating the cached struct type so the same shape used as a stack local also picked up `Block`. - Lower `ptr_slice_ptr_ptr` and `ptr_slice_len_ptr` - No longer emit a redundant `**T` typed `OpVariable` for function parameters. Logical addressing also forbids such variables. - Eliminate dead code from invocation globals unreachable from any entry point. Reverting the workaround in `lib/std/start.zig`.