aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-08-01 22:04:18 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-08-01 22:04:18 -0700
commitdae4c18aa7999a866b6b145ed3c88cb6c06852be (patch)
tree6aa41102b19c8e0af04bf1dd8af5158c4cc8b3a5 /src/codegen/spirv.zig
parentd5f173d28f2991e05dad399ed4d688297e0a5ca7 (diff)
downloadzig-dae4c18aa7999a866b6b145ed3c88cb6c06852be.tar.gz
zig-dae4c18aa7999a866b6b145ed3c88cb6c06852be.zip
stage2: ZIR encodes comptime parameters
`func_extended` ZIR instructions now have a one of the unused flags used as a `has_comptime_bits` boolean. When set, it means 1 or more parameters are `comptime`. In this case, there is a u32 per every 32 parameters (usually just 1 u32) with each bit indicating whether the corresponding parameter is `comptime`. Sema uses this information to correctly mark generic functions as generic. There is now a TODO compile error in place in case a generic function call happens. A future commit will do the generic function call implementation.
Diffstat (limited to 'src/codegen/spirv.zig')
0 files changed, 0 insertions, 0 deletions