aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread/RwLock.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-17 11:51:22 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-02-18 19:17:20 -0700
commitfaa44e2e5875036b105d8b7d38ccb2e93757a3c5 (patch)
treefc384ad77143ae6a5c7df5a19da4c2ccfef364d9 /lib/std/Thread/RwLock.zig
parent6733e43d87d4fe7b9d89948ebb95a72515c44fee (diff)
downloadzig-faa44e2e5875036b105d8b7d38ccb2e93757a3c5.tar.gz
zig-faa44e2e5875036b105d8b7d38ccb2e93757a3c5.zip
AstGen: rework multi-object for loop
* Allow unbounded looping. * Lower by incrementing raw pointers for each iterable rather than incrementing a single index variable. This elides safety checks without any analysis required thanks to the length assertion and lowers to decent machine code even in debug builds. - An "end" value is selected, prioritizing a counter if possible, falling back to a runtime calculation of ptr+len on a slice input. * Specialize on the pattern `0..`, avoiding an unnecessary subtraction instruction being emitted. * Add the `for_check_lens` ZIR instruction.
Diffstat (limited to 'lib/std/Thread/RwLock.zig')
0 files changed, 0 insertions, 0 deletions