Re: GC safety and return values
Michael Sperber 27 Dec 2003 16:08 UTC
>>>>> "Tom" == Tom Lord <xxxxxx@emf.net> writes:
>> From: Michael Sperber <xxxxxx@informatik.uni-tuebingen.de>
>> Having worked a lot on XEmacs GC issues, I disagree. What makes
>> it suck in (X)Emacs (IMHO) is the fact that there isn't a
>> consistent methodology to using GCPRO, and that developers
>> constantly try to "optimize" the use of it.
Tom> Is that mostly to avoid the cost of GC(UN)PRO calls?
Yes.
Tom> That's why I suggest GCPROtecting "frame" structures that hold an
Tom> arbitrary number of variables at once. This approach also makes
Tom> it easier to add and remove variables without having to
Tom> simultaneously update GC(UN)PRO calls.
But (X)Emacs allows this. It's not about the cost---it's about the
*perceived* cost.
Tom> Whether a primitie can trigger GC isn't something the FFI should speak
Tom> about (because, really, GC can happen just about anytime).
Right; that comes down to just about the same thing.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla