diff options
| author | Keith Packard <keithp@keithp.com> | 2016-11-11 21:11:13 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:50 -0800 | 
| commit | 29c890b4599b3bbdbd09a5915ea68a63f4e0a9ac (patch) | |
| tree | 791966151a186d37ba143d7a56f0f3640add54bd /src/lisp/ao_lisp_frame.c | |
| parent | d46ca67f93e9ecbc4d8c051c3fbdead85490b690 (diff) | |
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>
Diffstat (limited to 'src/lisp/ao_lisp_frame.c')
| -rw-r--r-- | src/lisp/ao_lisp_frame.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/lisp/ao_lisp_frame.c b/src/lisp/ao_lisp_frame.c index 90344719..082860ee 100644 --- a/src/lisp/ao_lisp_frame.c +++ b/src/lisp/ao_lisp_frame.c @@ -83,9 +83,9 @@ frame_move(void *addr)  			ao_lisp_poly_move(&v->val, 0);  		}  		next = ao_lisp_poly_frame(frame->next); -		ret = 1; -		if (next) -			ret = ao_lisp_move_memory((void **) &next, frame_size(next)); +		if (!next) +			break; +		ret = ao_lisp_move_memory((void **) &next, frame_size(next));  		if (next != ao_lisp_poly_frame(frame->next))  			frame->next = ao_lisp_frame_poly(next);  		if (ret) | 
