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:
Leon Timmermans
Date:
July 10, 2010 11:09
Subject:
Re: [perl #76438] peephole optimiser could prune more dead code
Message ID:
AANLkTinUFvRkwoWxu5LfRR8pA4HzRwgKENxwYsjvgn55@mail.gmail.com
On Sat, Jul 10, 2010 at 4:17 PM, demerphq <demerphq@gmail.com> wrote:
>
> I also proposed a "no magic" pragma/syntax that would allow the
> optimiser to assume that all variables were "normal", and that funky
> stuff wasnt going to occur during the scope of the pragma. And in such
> a block i would expect this to block to be optimised away.

The use of magic is too pervasive for that. Not only because many
special variables use active magic ($!, $1, %ENV, %SIG, etc…) but also
autovivication, m//g state, tainting and utf8 caching, $#array, pos(),
lvalue substr(), scalar(keys) and a number of more obscure things.

I don't think it's workable.

Leon

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