aboutsummaryrefslogtreecommitdiff
path: root/lib/std/simd.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-29 22:19:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-29 22:19:06 -0700
commit05947ea870f95ab90a75e174079492f546baaf72 (patch)
tree10c9a048bb1d55ce553c42c8f8e4f969241925cc /lib/std/simd.zig
parent83617eac5902a9e66449e8c409dfa9e560bf9f12 (diff)
downloadzig-05947ea870f95ab90a75e174079492f546baaf72.tar.gz
zig-05947ea870f95ab90a75e174079492f546baaf72.zip
stage2: implement `@intToError` with safety
This commit introduces a new AIR instruction `cmp_lt_errors_len`. It's specific to this use case for two reasons: * The total number of errors is not stable during semantic analysis; it can only be reliably checked when flush() is called. So the backend that is lowering the instruction must emit a relocation of some kind and then populate it during flush(). * The fewer AIR instructions in memory, the better for compiler performance, so we squish complex meanings into AIR tags without hesitation. The instruction is implemented only in the LLVM backend so far. It does this by creating a simple function which is gutted and re-populated with each flush(). AstGen now uses ResultLoc.coerced_ty for `@intToError` and Sema does the coercion.
Diffstat (limited to 'lib/std/simd.zig')
0 files changed, 0 insertions, 0 deletions