Skip to content
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

Shrink code bloat due to error handling #1584

Closed
athas opened this issue Feb 3, 2022 · 0 comments · Fixed by #1588
Closed

Shrink code bloat due to error handling #1584

athas opened this issue Feb 3, 2022 · 0 comments · Fixed by #1588

Comments

@athas
Copy link
Member

athas commented Feb 3, 2022

The C code generator must take care to avoid leaking memory during program failures, but the way it currently does it is very stupid and leads to code bloat. This should be improved.

athas added a commit that referenced this issue Feb 4, 2022
Previously, every error point would contain code to free every memory
block in scope.  This caused significant code duplication.  Now they
jump to a shared function epilogue that frees all memory blocks.

Closes #1584.
athas added a commit that referenced this issue Feb 4, 2022
Previously, every error point would contain code to free every memory
block in scope.  This caused significant code duplication.  Now they
jump to a shared function epilogue that frees all memory blocks.

Closes #1584.
athas added a commit that referenced this issue Feb 4, 2022
Previously, every error point would contain code to free every memory
block in scope.  This caused significant code duplication.  Now they
jump to a shared function epilogue that frees all memory blocks.

Closes #1584.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant