summaryrefslogtreecommitdiff
path: root/src/scheme/ao_scheme_cons.c
Commit message (Collapse)AuthorAge
* altos/scheme: Replace per-type indexed stash with poly stash heapKeith Packard2017-12-19
| | | | | | | Instead of having a random set of stash arrays with explicit indices used by callers, just have a general heap. Less error prone, and less code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: AO_SCHEME_IS_CONS -> ao_scheme_is_consKeith Packard2017-12-19
| | | | | | | This inline was already defined; just use it. Also, switch some places to use ao_scheme_is_pair instead as appropriate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: ao_scheme__cons -> ao_scheme_consKeith Packard2017-12-19
| | | | | | Fix the double underscore in this name. Ick. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Rework display/write codeKeith Packard2017-12-19
| | | | | | | | | | Unify output functions and add bool to switch between write and display mode. Make that only affect strings (as per r⁷rs). Use print recursion detection in frame and stack code, eliminating PRINT flags in type field. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Use memory manager mark code to note recursive printKeith Packard2017-12-17
| | | | | | | This flags any object being printed and checks before recursing to avoid infinite loops. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Use AO_SCHEME_IS_CONS in cons memory funcsKeith Packard2017-12-17
| | | | | | | More efficient than ao_scheme_poly_type as it doesn't care about non-prim types. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: add list-copyKeith Packard2017-12-11
| | | | | | A lot easier as a built-in; the obvious scheme version is recursive. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Avoid crashing with non-list in lengthKeith Packard2017-12-10
| | | | | | | Use ao_scheme_cons_cdr to fetch the next list element as that returns NULL for non-cons elements. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>