Martin Buchholz <martin(a)xemacs.org> writes:
It's true that there will be the urge to just do
bar (Lisp_FOO_to_Object (alloc_lcrecord_type (Lisp_FOO, &lrecord_FOO)));
which will lose horribly. But someone will submit a patch out of the
blue to implement conservative gc for the stack, right? It happened
for mule support on Windows (thanks Tomonori!).
I am still thing it might be a big win to use a C++ compiler to catch
GCPRO mistakes (if we really switched to C++ we could even have objects
GCPRO themselves). In fact I think a C++ compiler could catch mistakes
like the above at compile time. The idea is to make function arguments
and return values to have different classes with no implicit
conversion between them. In the same way you could catch most if not all
calls to functions that can GC from functions that cannot. [I still
haven't tried this so there may be some snag somewhere.]
Jan