[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when GC is permitted



   Date: Thu, 8 Jan 2004 11:47:33 -0800 (PST)
   From: Tom Lord <lord@xxxxxxx>

       > From: Jim Blandy <jimb@xxxxxxxxxx>

       > 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