develooper Front page | perl.perl5.porters | Postings from October 2004

Re: optimization idea

Thread Previous
From:
Dave Mitchell
Date:
October 25, 2004 16:12
Subject:
Re: optimization idea
Message ID:
20041025231259.GC5842@iabyn.com
On Mon, Oct 25, 2004 at 04:25:57PM -0500, David Nicol wrote:
> okay.  so lexicals that have not had references taken from them and
> have not existed
> while an eval is in place in their scope
> get marked as early replacable whenver they get a constant
> assigned, and the flag gets cleared when 
>     
>      assigned to by something not a constant
> 
>       a reference is taken (or has been taken ealier in its life)
> 
>      there is an eval anywhere in the possible execution paths

I could add several to the list off the top of my head:

    s//e or s///ee
    a regexp with (?{ ...code... }) in it
    a regexp with C<use re "eval"> enabled
    gotos or LABELs
    conditionals, eg C<my $x = 'foo' if bar()>

> it's still possible

But not necessarily desirable.

-- 
Technology is dominated by two types of people: those who understand what
they do not manage, and those who manage what they do not understand. 

Thread Previous


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