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

Re: boehm & guile, success report.


Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:

> mlivshin@bigfoot.com writes:
>
> > ah, you mean that every SCM_NEWCELL is actually a GC_malloc()?  this
> > is a valid approach,
> 
> yep.
> 
> > but it'll require some tag structure redesign to
> > be really usable.
> 
> why?

smobs.  if you want your own smob free function to run (you may not
to, with Boehm, unless you disguise the pointers somehow), you'll have 
to play by by Boehm's rules with regards to object tags.  I think.

> most home-brew GC's aren't as sophisticated as Boehm's. Perhaps
> GUILE's is.

for Scheme, yes.  it may be that the Boehm GC is more efficient in
what it does (in some areas, certainly), but the Guile GC simply has
to do much less, as it's mostly precise.  but let's see where you get
with tuning BGC and making it not just scan everything.

> > [ in fact, in the long run, I think that it would be very worthwhile
> >   to divorce the Scheme execution stack from the C one.  apart from
> >   making continuations much cheaper, this would make the need to know
> >   the C stack origin unnesessary, etc.  but that's stuff for a
> >   separate discussion. ]
> 
> [going into separate discussion]
> 
> That does seem to make C-integration for normal applications hard ,
> doesn't it?

not really harder than it's now.

now, if you don't want to go the `main'-capturing route, you *have* to
know where the C stack begins.  but if the Scheme evaluator doesn't
use the C stack, all you have to guarrantee is that your C procedures
are called from Scheme -- the evaluator would keep notes of where the
C stack frames begin.

also, it'll be hard to support the current API where you can setup an
exception-catching context in C code.  no great loss, I think.

-- 
... it's just that in C++ and the like, you don't trust _anybody_,
and in CLOS you basically trust everybody.  the practical result
is that thieves and bums use C++ and nice people use CLOS.
                -- Erik Naggum


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]