4 ms·
The irony of implementing Lisp in assembly is that, almost for free (sorry about that), you get precise, convenient control of the memory situation. Just put th
by marcpaq 9y ago
The irony of implementing Lisp in assembly is that, almost for free (sorry about that), you get precise, convenient control of the memory situation. Just put the gc root exclusively in registers.
I wrote a Lisp interpreter in assembly that dedicates 4-5 registers for the current expression, eval environment, and so on. The mark-sweep collector starts from these registers.
https://github.com/marcpaq/arpilisp https://github.com/marcpaq/arpilisp
- rrmm 9y agoCool project. It's much clearer than I would have thought in asm. The inline documentation is good.
- kazinator 9y agoNo irony there. You need precise control over the machine to implement a paradigm accurately from the ground up. It's hard to do that using someone else's paradigm, living with their choices of what aspects of the machine are still revealed and which are hidden.