aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-08-27 18:48:01 +0300
committerAndrew Kelley <andrew@ziglang.org>2022-09-12 01:52:44 -0400
commite323cf1264f390911dcc2efea71d46be1d631d92 (patch)
treeffe4c716e299e94ef1ed797f32aed8451e8090c9 /lib/std
parentc97d64b677eb891144fb356e1f4b9011c60cc0e2 (diff)
downloadzig-e323cf1264f390911dcc2efea71d46be1d631d92.tar.gz
zig-e323cf1264f390911dcc2efea71d46be1d631d92.zip
stage2: change how defers are stored in Zir
Storing defers this way has the benefits that the defer doesn't get analyzed multiple times in AstGen, it takes up less space, and it makes Sema aware of defers allowing for 'unreachable else prong' error on error sets in generic code. The disadvantage is that it is a bit more complex and errdefers with payloads now emit a placeholder instruction (but those are rare). Sema.zig before: Total ZIR bytes: 3.7794370651245117MiB Instructions: 238996 (2.051319122314453MiB) String Table Bytes: 89.2802734375KiB Extra Data Items: 430144 (1.640869140625MiB) Sema.zig after: Total ZIR bytes: 3.3344192504882812MiB Instructions: 211829 (1.8181428909301758MiB) String Table Bytes: 89.2802734375KiB Extra Data Items: 374611 (1.4290275573730469MiB)
Diffstat (limited to 'lib/std')
0 files changed, 0 insertions, 0 deletions