This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: generational GC
- To: Michael Livshin <mlivshin at bigfoot dot com>
- Subject: Re: generational GC
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 22 Mar 2000 12:53:48 +0100
- Cc: guile at sourceware dot cygnus dot com, Greg dot Harvey at thezone dot net
- Cc: djurfeldt at nada dot kth dot se
- References: <s3og87v1fm.fsf@verisity.com>
Michael Livshin <mlivshin@bigfoot.com> writes:
> so the write barrier has to be explicit and reflected in the API.
> writing `SCM_VELTS(v, 0) = x;' will be not kosher at all anymore, and
> that's a problem.
I think it's only an improvement of the API to have both accessors and
selectors for each type. Note also that one would like to be able to
distinguish sets with write barrier from cases where it isn't needed,
so we should have, like,
SCM_CAR (z)
SCM_SETCAR (z, x)
SCM_GEN_SETCAR (z, x)
SCM_VELT (v, i)
SCM_SET_VELT (v, i, x)
SCM_GEN_SET_VELT (v, i, x)
Two points, though:
1. Maybe GEN isn't the best symbol to use...
2. Perhaps (in order to make the API simpler for the simple-minded)
set *with* write barrier should be the default:
SCM_CAR (z)
SCM_SLOPPY_SETCAR (z, x)
SCM_SETCAR (z, x)
(3. Maybe SLOPPY isn't the best symbol to use... :)