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
January 28, 2014 01:29
Re: [perl #121077] [PATCH] Optimise 'my $x; my $y' into 'my ($x, $y)'
Message ID:
On Mon, Jan 27, 2014 at 6:44 PM, Tony Cook via RT
<> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About