summaryrefslogtreecommitdiff
path: root/src/lisp/ao_lisp_builtin.c
Commit message (Collapse)AuthorAge
* altos/lisp: add progn, while, read and evalKeith Packard2016-11-17
| | | | | | | | Progn as a builtin will help with tail-recursion. while provides for loops until tail-recursion works :-) read and eval are kinda useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Clean up OS integration bits, add defunKeith Packard2016-11-17
| | | | | | | Provide an abstraction for the OS interface so that it can build more cleanly on Linux and AltOS. Add defun macro. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: working on lexical scopingKeith Packard2016-11-17
| | | | | | Not working yet Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: more GC issues. add patomKeith Packard2016-11-17
| | | | | | | Use global ao_lisp_stack instead of local stack so that gc moves of that item work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Change GC move APIKeith Packard2016-11-17
| | | | | | | | Pass reference to move API so it can change the values in-place, then let it return '1' when the underlying object has already been moved to shorten GC times. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: get builtin macros working againKeith Packard2016-11-17
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add lambda support to lispKeith Packard2016-11-17
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Separate out values from atomsKeith Packard2016-11-17
| | | | | | | | | | | This enables changing values of atoms declared as constants, should enable lets, and with some work, even lexical scoping. this required changing the constant computation to run ao_lisp_collect() before dumping the block of constant data, and that uncovered some minor memory manager bugs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: add set/setq and ' in readerKeith Packard2016-11-17
| | | | | | Along with other small fixes Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Change lisp objects to use ao_poly everywhere. Add constKeith Packard2016-11-17
| | | | | | | | | | | This makes all lisp objects use 16-bit ints for references so we can hold more stuff in small amounts of memory. Also adds a separate constant pool of lisp objects for builtins, initial atoms and constant lisp code. Now builds (and runs!) on the nucleo-32 boards. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add first lisp bitsKeith Packard2016-11-17
Signed-off-by: Keith Packard <keithp@keithp.com>