This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: generational GC


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... :)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]