Simplify Lisp calling convention #19
Labels
No labels
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#19
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?
In version 0.0.X, all Lisp functions written in C had the signature:
and I've reproduced this heedlessly in 0.1.X as:
However
frameandframe_pointerboth point to the exact same thing: the actual object in memory. It's just thatframeis the byte offset in memory as visible to the C program, andframe_pointeris a{node, page, offset}structure, where thepageis an index into thepages[]array which holds(struct page *)pointers, and theoffsetis an offset into that page considered as an array of 64 bit words, so providednodeis the current node (and if it isn't, we should request a copy of the memory object from that node), the C address of any object should be possible to be calculated as:Which means our calling convention should be possible to be just:
This seems to me a lot more elegant, and will make the Lisp compiler a lot easier to write, but if we're going to do it, now is the time to do it!
Didn't auto-close on the commit message :-(