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

Re: guile and emacs


Jim Blandy <jimb@red-bean.com> writes:

> For example, note that the code below is incorrect in Emacs.  Assume
> all functions return Lisp_Object values:
> 
> 	foo (bar (), baz ())
> 
> Suppose the compiler calls bar first, then baz.  While baz runs, foo's
> frame holds a reference to bar's return value --- possibly the only
> one.  If collection can occur in baz, then bar's return value will be
> collected.  Instead, you must write:
> 
> 	{
> 	  Lisp_Object temp = Qnil;
> 	  GCPRO1 (temp);
> 
> 	  temp = bar ();
> 	  foo (temp, baz ());
> 	}
> 
> But for anyone who has not worked on both Guile and Emacs, these
> arguments are anecdotal, and the usual way of thinking about program
> design suggests the opposite conclusion.  So I don't know what to do.
> Any suggestions?

I think sharing your experience with precise vs conservative GC is one
important thing.  We could also try to sift the archives for
discussions on this topic.

I think it would be a really big mistake to settle for an interface
compatible with precise GC if the problems with conservative GC are
just phantoms.

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