> 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.
> (BTW, Tom will be quite disappointed with what GCC's optimizer
> will do to Pika-style code; go and try it.)
You need to be much more specific.
I doubt I have any illusions there. I doubt it is significantly
different from what _correct_use_ of the draft-style interfaces will
do. In some cases it may be better (as for example, when passing
through parameters to a called function -- the draft requires a
separate GCPROtection of those parameters). And in implementations
using conservative stack scanning or otherwise don't require barriers,
I think Pika-style will do quite well indeed.
-t