Re: Weak Vectors Patch

2010-04-18 Thread Andy Wingo
Hi, On Sat 17 Apr 2010 22:48, l...@gnu.org (Ludovic Courtès) writes: > Clinton Ebadi writes: > >> I talked to wingo, and he suggested that (equal? WEAK-VECTOR VECTOR) => >> #f; > > Hmm what’s the motivation? It seems more intuitive to me to have, e.g., > > (equal? (make-vector 3 4) (make-weak

Re: Weak Vectors Patch

2010-04-17 Thread Ludovic Courtès
Hi! Clinton Ebadi writes: > l...@gnu.org (Ludovic Courtès) writes: [...] >> The patch looks good to me, modulo a few things: >> >> - Could you make it 3 (or 4?) different patches, each with a test case >> showing what is being fixed? >> >> - If that’s fine with you, you’ll need to assi

Re: Weak Vectors Patch

2010-04-17 Thread Clinton Ebadi
l...@gnu.org (Ludovic Courtès) writes: > For these last two things, we’d need to modify the ‘vector-ref’ and > ‘vector-set’ instructions so that they do the right thing. The best > solution would be to just call scm_c_vector_{ref,set_x} when > SCM_I_WVECTP, so that the overhead remains low for re

Re: Weak Vectors Patch

2010-04-05 Thread Andy Wingo
On Mon 05 Apr 2010 19:03, l...@gnu.org (Ludovic Courtès) writes: > For these last two things, we’d need to modify the ‘vector-ref’ and > ‘vector-set’ instructions so that they do the right thing. The best > solution would be to just call scm_c_vector_{ref,set_x} when > SCM_I_WVECTP, so that the o

Re: Weak Vectors Patch

2010-04-05 Thread Ludovic Courtès
Hi! Clinton Ebadi writes: > Attached is a patch that should improve weak vectors and prevent > `vector-ref' from segfaulting on them after a GC. > > The root of the problem was that weak vectors were being allocated as > containing no pointers *and* disappearing links were not being > registered

Weak Vectors Patch

2010-04-01 Thread Clinton Ebadi
Attached is a patch that should improve weak vectors and prevent `vector-ref' from segfaulting on them after a GC. The root of the problem was that weak vectors were being allocated as containing no pointers *and* disappearing links were not being registered for initial elements. If you, however,