summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_save.c
Commit message (Collapse)AuthorAge
* altos/scheme: Rename to 'scheme', clean up buildKeith Packard2017-12-05
| | | | | | | | | Constant block is now built in a subdir to avoid messing up source directory. Renamed to ao_scheme to reflect language target. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Finish first pass through r7rsKeith Packard2017-11-17
| | | | | | | | | | * print -> write, patom -> display * Add read-char, write-char * Add exit, current-jiffy, current-second, jiffies-per-second * Add for-each and string-for-each * Avoid duplicate builtins with different atoms Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add scheme-style bools (#t and #f)Keith Packard2017-11-16
| | | | | | Cond and while compare against #f, just like scheme says to. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add casts to keep the latest GCC from whingingKeith Packard2017-02-20
| | | | | | Something about alignment issues. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add incremental collectionKeith Packard2017-02-20
| | | | | | | | | | | | Realizing that long-lived objects will eventually float to the bottom of the heap, I added a simple hack to the collector that 'remembers' the top of the heap the last time a full collect was run and then runs incremental collects looking to shift only objects above that boundary. That doesn't perfectly capture the bounds of transient objects, but does manage to reduce the amount of time spent not moving persistent objects each time through the collector. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Cache freed cons and stack itemsKeith Packard2017-02-20
| | | | | | | | | Track freed cons cells and stack items from the eval process where possible so that they can be re-used without needing to collect. This dramatically reduces the number of collect calls. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Append a CRC to the saved image to validate on restoreKeith Packard2017-02-20
| | | | | | | The CRC is actually of the ROM bits, so we can tell if the restored image relates to the currently running code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add save/restore infrastructure. Needs OS support to work.Keith Packard2017-02-20
This sticks a few globals past the end of the heap and then asks the OS to save the heap. On restore, the heap is re-populated by the OS and then various global variables reset. Signed-off-by: Keith Packard <keithp@keithp.com>