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:
Reini Urban
Date:
July 12, 2010 12:15
Subject:
Re: [perl #76438] peephole optimiser could prune more dead code
Message ID:
AANLkTinJh6mTDT8EfjDQBaz_OHEQ8b6exuadnV9Xu66q@mail.gmail.com
2010/7/12 Dave Mitchell <davem@iabyn.com>:
> 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.

Oops, right.
Something like op_defined or op_ref would be the cheapest existing op
then doing the SvGETMAGIC, or we would need a new op,
probably named pp_sideeffect or pp_getmagic.

> 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);
-- 
Reini

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