# regalloc: ensure we only freeze/unfreeze at the outermost scope · gitcafe/zig

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

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

Visibility: public

Requested revision: ac954eb539ec242af568fe3565094cea12c4beea

Requested commit: ac954eb539ec242af568fe3565094cea12c4beea

Commit: ac954eb539ec242af568fe3565094cea12c4beea

Tree: 388b3c11137f23393ff877699f86df4b43666501

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
regalloc: ensure we only freeze/unfreeze at the outermost scope

This prevents a nasty type of bugs where we accidentally unfreeze
a register that was frozen purposely in the outer scope, risking
accidental realloc of a taken register.

Fix CF flags spilling on aarch64 backend.

```

## Parents

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

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