Environment in stack frame #20
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#20
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?
The current stack frame has a payload of fourteen words, but only twelve are used.
The current calling signature for Lisp functions is:
In other words, if the
MANAGED_POINTER_ONLYthing works efficiently (and it should) we've cut the number of C args to a Lisp function to two. But, if we hadenvas a first class slot in the frame, rather than something passed around the side, not only would the compiler be simpler to write, but also the execution-time environment would be available in exceptions and stack traces.The downside is we'd need to
inc_refit anddec_refit as the stack frame was constructed and destroyed, meaning two more (cheap) operations for every function invocation. I think this is worth doing.