Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tools to make non-conservative GC feasible.
> The thing about it is that just declaring all SCM values as stack
> values requires near to nil intelligence. The big knock against
> explicit marking is that it requires the whole tedious task of doing
> this... even with a tool that tells you that you didn't do it in some
> place, it's still a big human hassle for little real benefit. If it
> were automatic (which may require a bit of discipline on the
> programmers part, but much less than the lather, rinse, repeat work of
> doing it manually), I don't think there'd be any reason to not go with
> explicit marking.
Well using g++ gives you a tool to do exactly that. You don't have to
use every feature of a C++ compiler, just the ones that you get some
benefit out of. It would be a blow to those without access to g++ though.
As Greg pointed out earlier, the real stumbling block is not figuring
out when SCM values come into scope it's figuring out when they drop out
of scope (i.e. the C++ destructor), this is especially difficult in the
presence of longjump exceptions. Whether you use explicit C macros to
declare a SCM value leaving scope or use the C++ destructors to do the
same, you are still going to have a bunch of SCM values that fall out
of scope after a longjump and then you have to check through the SCM
values that you know, check how much stack the longjump drops and toss
away some SCM values -- tricky but possible -- conservative GC handles
this without any special effort.
- Tel
Guile Home |
Main Index |
Thread Index