0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

zig ir.cpp details: remove the mem_slot mechanism

Previously, there was hacky code to deal with result locations and how
they work with regards to comptime values and runtime values. In
addition, there was a hacky "mem_slot" mechanism that managed the memory
for local variables, and acted differently depending on comptime vs
runtime situations. All that is deleted in this commit, and as a result,
result locations code has one less complication.

Importantly, this means that a comptime result location is now passed to
a function when it is evaluated at comptime.

This test causes many regressions, and some of the behavior tests are
disabled (commented out) in this commit. Future commits will re-enable
the tests before merging the branch.
This commit is contained in:
Andrew Kelley 2020-01-09 19:15:46 -05:00
commit fbcee58cfc
No known key found for this signature in database
GPG key ID: 7C5F548F728501A9
6 changed files with 278 additions and 234 deletions