Olivier Galibert <galibert(a)pobox.com> writes:
On Thu, Nov 16, 2000 at 01:24:04PM +0000, Gunnar Evermann wrote:
> Yes, that's what I realised after writing the question and meant by
> "Hm, I guess it is". We should automatically check whether we always
> do this. Maybe in debug_gcpro().
Tricky. There are a number of gcpros done on already instanciated
lisp objects, and nothing looks more like a valid lisp_object than
random garbage. You can't even test for alignment since the lower
bits encode the type information for integers and chars.
Yes, you are right.
Maybe Jan's old idea of using C++ and explicit constructor and
destructor methods for LispObject would work.
We could just inintialise LispObjects to NULL in the constructor. Then
we can check in GCPRO (giving some false positives as they only need
to hold real LispObjects when the GC actually happens). Alternatively
we could have a special function that is always called when a GC could
happen (like always_gc) and then checks the gcprolist for NULLs.
Gunnar