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

Re: [perl #121077] [PATCH] Optimise 'my $x; my $y' into 'my ($x, $y)'

Thread Previous | Thread Next
From:
wolfsage
Date:
January 28, 2014 01:29
Subject:
Re: [perl #121077] [PATCH] Optimise 'my $x; my $y' into 'my ($x, $y)'
Message ID:
CAJ0K8biQcTQVb1PGE2jurZqtjqB_mc5HJ84v08Pn2kxjhjd0wA@mail.gmail.com
On Mon, Jan 27, 2014 at 6:44 PM, Tony Cook via RT
<perlbug-followup@perl.org> wrote:
> One issue with both patches is deparsing:
>
> tony@mars:.../git/perl2$ ./perl -Ilib -MO=Deparse -e 'sub foo { my $x; my $y; 1 }'
> sub foo {
>     my($x, $y);
>     1;
> }
> -e syntax OK
>

I think I can do this by preserving the original optree on the side,
and pointing to it from the nulled out nexstate, in conjunction with
$B::overlay. Id have to copy the padops to preserve the pointers.

I welcome any other ideas though.

-- Matthew Horsfall (alh)

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