aboutsummaryrefslogtreecommitdiff
path: root/src/RangeSet.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-03-30 21:22:30 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-03-30 21:28:36 -0700
commit2a1dd174cdb3a084eef295613b03e94be4d843b9 (patch)
tree49be90404a7d3471aac6f3ab1ebe864ca438629f /src/RangeSet.zig
parent195ddab2be938c1201767909d39106cdf99fd07e (diff)
downloadzig-2a1dd174cdb3a084eef295613b03e94be4d843b9.tar.gz
zig-2a1dd174cdb3a084eef295613b03e94be4d843b9.zip
stage2: rework AstGen for switch expressions
The switch_br ZIR instructions are now switch_block instructions. This avoids a pointless block always surrounding a switchbr in emitted ZIR code. Introduce typeof_elem ZIR instruction for getting the type of the element of a pointer value in 1 instruction. Change typeof to be un_node, not un_tok. Introduce switch_capture ZIR instructions for obtaining the capture value of switch prongs. Introduce Sema.resolveBody for when you want to extract a *Inst out of a block and you know that there is only going to be 1 break from it. What's not working yet: AstGen does not correctly elide store instructions when it turns out that the result location does not need to be used as a pointer. Also Sema validation code for duplicate switch items is not yet implemented.
Diffstat (limited to 'src/RangeSet.zig')
0 files changed, 0 insertions, 0 deletions