Skip to content

inline ConstGlobalRefs into ZigValue #3817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

andrewrk
Copy link
Member

@andrewrk andrewrk commented Dec 1, 2019

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

@daurnimator daurnimator added the stage1 The process of building from source via WebAssembly and the C backend. label Dec 1, 2019
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.
@andrewrk andrewrk force-pushed the kill-ConstGlobalRefs branch from b5df18c to dff1481 Compare December 1, 2019 21:40
Total bytes used for std lib tests:
3.198 GiB -> 2.910 GiB (saving 295 MiB)
@andrewrk
Copy link
Member Author

andrewrk commented Dec 2, 2019

Merged into #3787 in 78811ff, landed in master in fecd540.

@andrewrk andrewrk closed this Dec 2, 2019
@andrewrk andrewrk deleted the kill-ConstGlobalRefs branch December 2, 2019 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants