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

support closures #2

Merged
merged 17 commits into from
Nov 3, 2023
Merged

support closures #2

merged 17 commits into from
Nov 3, 2023

Conversation

xffxff
Copy link
Owner

@xffxff xffxff commented Nov 3, 2023

Support closures with the risk of memory leaks.

We now put all values on the heap and just store the value's position in the heap on the stack. When the function call completes, we simply clear the local variables created by the function on the stack, but do not delete the values on the heap. This allows closures with closed upvalues to work easily, but leaks memory.

@xffxff xffxff merged commit 630607f into main Nov 3, 2023
4 checks passed
@xffxff xffxff deleted the closure branch November 3, 2023 15:39
@xffxff xffxff mentioned this pull request Nov 9, 2023
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 this pull request may close these issues.

None yet

1 participant