temporary objects in a function must be bound to a locals slot in the stack frame #21
Labels
No labels
Architecture change
Won't fix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: simon/post-scarcity#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
One of the problems on 0.0.X was what happened with temporary objects in functions. They never got
inc_refed and they never gotdec_refed; and so they could never be garbage collected. This has to change; which means that functions with C calling conventions have to disappear.There has to be a
localsslot on the stack frame. Any temporary object has to be pushed onto thelocalsslot. That way, it'sinc_refed when it's pushed, anddec_refed when the stack frame is garbage collected; and so, if nothing else is hanging onto it,it too will be garbage collected. This means that every function which may ever for any reason create an object must have a stack frame passed to it, even if that function is never intended to be directly called from Lisp.This is a major architectural change, but better to do it now because it will become much harder later.