This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Package initialisation in CL boot
* Charles Turner [2012-07-05 15:18] writes:
> I'm starting to suspect that the String<->Symbol mappings I'm
> populating in initLisp are getting garbage collected by the time the
> defun(..) bits are happening in initLisp. The loadClass and
> importLocation stuff was happening before the defun bits, so I can
> only surmise they were somehow trashing CL external symbol table.
> Placing my standard package population code right before the DEFUN's
> solved the problem, and I get the behaviour I expect. This isn't
> completely satisfing not knowing what happened. Is it feasible that
> because of the weak references in AbstractHashTable, they were getting
> collected somehow? Anyway, my standard CL definitions are working, no
> I just need stop the compiler saying things like "No declaration seen
> for {COMMON-LISP-USER}:+ and instead retry such failed lookups in the
> default namespace...
Sounds plausible to me. In Common Lisp, interned symbols can usually
not be garbage collected because of FIND-SYMBOL: if GCed naively
FIND-SYMBOL could return something different before and after GC.
Traditionally the function GCTWA "garbage collect truly worthless atoms"
was there for such cases: it removed those symbols that had unbound
value, function, and plist slots.
Helmut