# zig ir.cpp details: remove the mem_slot mechanism · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/fbcee58cfcabddd3e0842e22141a983a8169502f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: fbcee58cfcabddd3e0842e22141a983a8169502f

Requested commit: fbcee58cfcabddd3e0842e22141a983a8169502f

Commit: fbcee58cfcabddd3e0842e22141a983a8169502f

Tree: 9d1c30d44988c13230a1e046d124dbaeba88f9dc

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
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.

```

## Parents

- [0240fd91401c8a20064da0efd5b1e8955e481f1b](https://git.cafe/gitcafe/zig/commit/0240fd91401c8a20064da0efd5b1e8955e481f1b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/fbcee58cfcabddd3e0842e22141a983a8169502f?format=markdown)
