develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #24237] @& doesn't set PL_sawampersand

Thread Previous
Father Chrysostomos via RT
January 12, 2012 08:33
[perl #24237] @& doesn't set PL_sawampersand
Message ID:
On Thu Jan 12 04:06:55 2012, demerphq wrote:
> On 11 January 2012 17:36, Father Chrysostomos via RT
> <> wrote:
> > And BTW, I’d like to get rid of this PL_sawampersand madness (thereby
> > closing about 6 RT tickets), but my first attempt failed, and my second
> > attempt is awaiting a response from Nicholas Clark on the status of
> Should I have a look?

If you could, that would be nice, but I was specifically asking the
reasoning behind this comment in sv.c: ‘it's somewhat dead code, never
expected to go live’.

The code looks fine to me, but having someone else disprove that would
be good. :-)

> Also if you are looking into this stuff also keep in mind that scalar
> /g is still a problem, and keep in mind why my patch to fix it was
> reverted (to prevent quadratic performance degradation in while (//g)
> matches).

Because it forces a pre-match copy for every iteration.  If the
pre-match copy never actually copies, that won’t be so much of a problem.

I have a local experimental patch that forces the pre-match copy to use
the shared string table, so that only the first copy is a real copy. 
But it causes memory corruption, and I haven’t got to the bottom of it
yet.  (Probably a stupid mistake somewhere.)

I wasn’t sure whether it was worth debugging my patch, considering that
PERL_OLD_COPY_ON_WRITE can already do what it does, and probably more


Father Chrysostomos

via perlbug:  queue: perl5 status: resolved

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About