Re: S_mergesortsv is naughty

[email protected] (Nicholas Clark) Sun, 22 Aug 2004 22:03:26 +0100
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
On Sat, Aug 21, 2004 at 07:11:25PM +0200, Mattia Barbon wrote:
>   Hello,
> while implementing mark() for Perl5PVAV I noticed that mergesortsv
> uses the array it is sorting to store things that are not PMCs
> causing segafaults if a DOD run is started during a Perl_sortsv

Mmm. Storable's going to blow up here because it stores something other
than SV pointers in one of its hashes. But it's core, so that's
soluble.

> call, when marking the array/stack live. The workaround I used

If you need a mark() at all on your PVAV implementation, does this mean
that the SVs, well, PMCs within it are not reference counted?

Have you solved how to avoid reference counting inside the perl core, letting
parrot's GC do all the work? I saw that as the thing to do before working
on AVs or HVs


Also, can the stable qsort be used in place of the mergesort as default?
(and disable the sort pragma entirely for ponie)
This would seem to avoid both hacks and re-implementation, assuming that
the qsort isn't also cheating in what is stores.


Nicholas Clark