Email list hosting service & mailing list manager


Re: when GC is permitted Richard Kelsey 08 Jan 2004 20:01 UTC

   Date: Thu, 8 Jan 2004 11:47:33 -0800 (PST)
   From: Tom Lord <xxxxxx@emf.net>

       > From: Jim Blandy <xxxxxx@redhat.com>

       > But you need to be clear about exactly what JNI-style really
       > implies. [....]

       > Here's the implementation of mn_car, with run-time typechecking
       > removed:

       >     mn_ref *
       >     mn_car (mn_call *call, mn_ref *pair)
       >     {
	     [....]
       >         result = mn__make_local_ref (mn__untag_pair (pair->obj)->car);
	     [....]
       >     }

       > mn__make_local_ref is an allocation.

   Pika-style doesn't have that problem.

Is this because the reference cell would be passed in by the caller?
Would it be fair to say that Pika-style is (in part) JNI-style with
(some) stack-allocated reference cells?  I am still confused about
it.  Perhaps you could give the mn_car() example in Pika.  Or mn_cadr()
might be more elucidating.

Also, when running in a system with a precise collector and
interrupt-anytime threads, Pika-style would require the elided
mn__[begin|end]_incoherent() critical section calls?

                                            -Richard