This is the mail archive of the guile@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]

tools to make non-conservative GC feasible.



Jim Blandy writes:
> This is basically what Emacs does.  I found that we frequently forgot
> to do the equivalent of s_defGc when it was necessary.  In your
> example, it's easy to see that rtn->length is protected, since rtn is
> protected, but when the function is doing something more complicated
> (walking and editing a tree), it got harder.
> 
> Don't get me wrong --- it feels nice and simple to me, too.  But it is
> a fact that I made a lot of mistakes.  Stallman did too.

The reason we like "conservative collectors" is because we can be lazy 
while programming and not worry about what does and doesn't have to be 
visible to the collector.

Of course, in fact it is pretty easy to figure out what does and
doesn't need to be protected -- the problem is that our C compilers
aren't built to accomodate that.

Maybe the trick is to build a simple tool that catches mistakes in
handing things to the collector. I suspect that some hacks to the
freely redistributable version of lint that comes with NetBSD these
days could be made to catch places where things weren't explicitly
handled.

Anyone have any thoughts?

Perry