altos/lisp: Make sure memmove only happens once per object. Other GC fixes
authorKeith Packard <keithp@keithp.com>
Sat, 12 Nov 2016 05:11:13 +0000 (21:11 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 18 Nov 2016 06:18:39 +0000 (22:18 -0800)
commitc8d2b9acf4b118f36a114de2af4db42ae04426ed
treecd76f44a0da4b71cceae28832ddda0cab0ae1566
parent7b99963e13f1cf3136c67521c851827377790a06
altos/lisp: Make sure memmove only happens once per object. Other GC fixes

The memmove may be overlapping, so make sure it happens only once by
just checking whether move_size has been set, rather than looking at
ao_lisp_moving; that doesn't get set when moving a noted cons as that
still needs to be walked at a later time.

Fix up the various looping move functions to all use the same
pattern. Atom was busted.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lisp/ao_lisp_atom.c
src/lisp/ao_lisp_cons.c
src/lisp/ao_lisp_eval.c
src/lisp/ao_lisp_frame.c
src/lisp/ao_lisp_mem.c