develooper Front page | perl.perl5.porters | Postings from July 2010

Re: [perl #76438] peephole optimiser could prune more dead code

Thread Previous | Thread Next
From:
Ben Morrow
Date:
July 13, 2010 04:43
Subject:
Re: [perl #76438] peephole optimiser could prune more dead code
Message ID:
20100713114339.GA62401@osiris.mauzo.dyndns.org
Quoth demerphq@gmail.com (demerphq):
> On 12 July 2010 20:30, Dave Mitchell <davem@iabyn.com> wrote:
> > On Mon, Jul 12, 2010 at 06:06:15PM +0200, Reini Urban wrote:
> >> gvsv is just checking magic and doing the sideeffect
> >
> > Huh? gvsv doesn't call magic.
> >
> > Also, just as a data point, note that pp_concat *explicitly* calls get
> > magic twice on $a . $a:
> >
> > � � � �if (left == right)
> > � � � � � �/* $r.$r: do magic twice: tied might return different 2nd time */
> > � � � � � �SvGETMAGIC(right);
> 
> Id like to argue that this was misguided. I dont think we guarantee
> any particular order in this case for the fetch calls and thus the
> statement is /still/ undefined even with this change.

Perl doesn't have undefined behaviour. No matter what weasel words
copied from stdc made it into the ++ docs, Perl's actual evaluation
order has always been straightforward and well-defined. Changing this
may be worth it, for a sufficiently beneficial optimisation, but it is
definitely a backwards-incompatible change.

Ben


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About