aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/RemoveDirStep.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2023-04-09 19:24:24 +0200
committerLuuk de Gram <luuk@degram.dev>2023-04-12 22:23:32 +0200
commit3c27df6b135f998facce1aa09a9926e840671a05 (patch)
tree4b400276a9df4f27bf574f671b2376dc3f8362cc /lib/std/Build/RemoveDirStep.zig
parent490a411fd4e00fee65bc014fa7b1af59042d269b (diff)
downloadzig-3c27df6b135f998facce1aa09a9926e840671a05.tar.gz
zig-3c27df6b135f998facce1aa09a9926e840671a05.zip
wasm: generate function to get tag name
When we lower the instruction for `@tagName` we generate a new function if it doesn't exist yet for that decl. This function creates an if-else chain to determine which value was provided. Each tag generates a constant that contains its name as the value. For each tag we generate a case where the pointer of the string is stored in the result slice. The length of the tagname is comptime-known, therefore will be stored in the slice directly without having it being part of the tagname symbol. In the future this can use a jump table instead of an if-else chain, similar to the `switch` instruction.
Diffstat (limited to 'lib/std/Build/RemoveDirStep.zig')
0 files changed, 0 insertions, 0 deletions