As many of you know, Richard Reingruber (primarily) and I are working
on making the GC in XEmacs replaceable. Right now, Richard is working
on simplifying XEmacs's data representation to make this easier. One
particular issue requires a policy decision to handle right: weak
lists.
Currently, weak lists are implemented as a special object around an
ordinary list which can be extracted via the `weak-list-list'
procedure. This exposes the internal representation of weak lists to
a degree so as to make proper generic handling in the GC difficult, so
we'd like to discuss changing it.
The simplest way to implement weak lists would be to just make them a
regular cons of a weak pointer (a more primitive object) and a weak
list, and have special accessors `weak-list-car' and `weak-list-cdr'.
`weak-list-car' looks for a live list cons, and performs some cleanup
work on the way. Possibly another thin layer above this for looping
would get us even further.
Doing would get rid of quite a bit of implementation complexity in
XEmacs.
As to the present code base which uses weak lists:
- *No* Lisp code presently.
- Simple weak lists for extend children and frame subwindows which
would be very easy to convert.
- Specifier alists for windows, a really awkward case which would
involve somewhat more special-casing as is the case presently.
Are there any objections to this change in principle?
(Note that all of this work is presently happening on a branch---we'd
just like to discuss issues such as this one to avoid having to revert
them later.)
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla