diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-01-03 07:54:53 +0000 |
|---|---|---|
| committer | Matthew Lugg <mlugg@mlugg.co.uk> | 2025-01-03 22:28:37 +0000 |
| commit | b4da8eef2a393543e9520c544364689ab482b080 (patch) | |
| tree | 3c21ba65a2bcb5eb3d970868d6d8b08e3757a073 /lib/std/Target | |
| parent | 252c2031011f80b35d01d5ba5a2a2577c870f90c (diff) | |
| download | zig-b4da8eef2a393543e9520c544364689ab482b080.tar.gz zig-b4da8eef2a393543e9520c544364689ab482b080.zip | |
Zir: split up start and end of range in `for_len`
The old lowering was kind of neat, but it unintentionally allowed the
syntax `for (123) |_| { ... }`, and there wasn't really a way to fix
that. So, instead, we include both the start and the end of the range in
the `for_len` instruction (each operand to `for` now has *two* entries
in this multi-op instruction). This slightly increases the size of ZIR
for loops of predominantly indexables, but the difference is small
enough that it's not worth complicating ZIR to try and fix it.
Diffstat (limited to 'lib/std/Target')
0 files changed, 0 insertions, 0 deletions
