aboutsummaryrefslogtreecommitdiff
path: root/lib/std/build/CheckFileStep.zig
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-11-10 11:58:34 -0700
committerCody Tapscott <topolarity@tapscott.me>2022-11-10 12:22:40 -0700
commit8f3880074fb76871d9a4f35d1f72d0304ac5b404 (patch)
treef9d2cce5de2ef4080766064f853a9f0793ab5696 /lib/std/build/CheckFileStep.zig
parentff699722da1f2df3e521c92cebe71c50910594d3 (diff)
downloadzig-8f3880074fb76871d9a4f35d1f72d0304ac5b404.tar.gz
zig-8f3880074fb76871d9a4f35d1f72d0304ac5b404.zip
stage2: Be more strict about eliding loads
This change makes any of the `*_val` instructions check whether it's safe to elide copies for by-ref types rather than performing this elision blindly. AIR instructions fixed: - .array_elem_val - .struct_field_val - .unwrap_errunion_payload - .try - .optional_payload These now all respect value semantics, as expected. P.S. Thanks to Andrew for the new way to approach this. Many of the lines here are from his recommended change, which comes with the significant advantage that loads are now as small as the intervening memory access allows. Co-authored by: Andrew Kelley <andrew@ziglang.org>
Diffstat (limited to 'lib/std/build/CheckFileStep.zig')
0 files changed, 0 insertions, 0 deletions