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

Re: when GC is permitted

This page is part of the web mail archives of SRFI 50 from before July 7th, 2015. The new archives for SRFI 50 contain all messages, not just those from before July 7th, 2015.



   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