# inline ConstGlobalRefs into ZigValue · gitcafe/zig

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

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

Visibility: public

Requested revision: b5df18c8fd725a2993c520ddc8777ecad71e3d11

Requested commit: b5df18c8fd725a2993c520ddc8777ecad71e3d11

Commit: b5df18c8fd725a2993c520ddc8777ecad71e3d11

Tree: 7036027c6652261cfeafce4819c809f1808e58dc

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
inline ConstGlobalRefs into ZigValue

Having ConstGlobalRefs be a pointer in ZigValue was a hack that caused
plenty of bugs. It was used to work around difficulties in type coercing
array values into slices.

However, after #3787 is merged, array values no longer type coerce into
slices, and so this provided an opportunity to clean up the code.

This has the nice effect of reducing stage1 peak RAM usage during the
std lib tests from 3.443 GiB to 3.405 GiB (saving 39 MiB).

There is one behavior test failing in this branch, which I plan to debug
after merging #3787.

```

## Parents

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

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