From: Bruno Haible <bruno@cl...> - 2004-04-26 20:22:32
For good CLOS optimizations (better than what clisp now has) one needs
pointers from a class to 1. its subclasses or 2. the generic functions
that discriminate on it. Weak hash tables seem to be what is desired.
The testsuite has all three of weakptr, hashweak, defhash marked "risky".
Are there bugs in weakptr?
Are there bugs in weak hash tables?
Why does the defhash test fail sporadically?
From: Bruno Haible <bruno@cl...> - 2004-04-27 14:40:15
> > Are there bugs in weakptr?
> yes, try the test.
Indeed, in SPVW_PAGES builds a bug shows up, which is not visible for
SPVW_BLOCKS builds. Thanks for the good tests that you added! Using them,
I've now tracked it down to the function gar_col_compact().
From: Bruno Haible <bruno@cl...> - 2004-04-28 10:44:03
> please do not forget to re-enable the test when you fix the bug.
Yes, I'll do this tomorrow.
This was a hard bug: After finding that the bug must be in gar_col_compact,
it took me an hour of thinking to understand that update_weakpointers()
must be called when the sweep has already been done, and that
update_weakpointers_mod() must be called when the sweep will be done after
the update. And it took me two more hours to understand why neither of them
is appropriate for use in gar_col_compact(). Namely, at the moment the
update in gar_col_compact() is done, part of the objects have already been
moved, and the rest will be moved afterwards.