develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [PATCH] jumbo closure fix

Thread Previous | Thread Next
From:
A Bergman
Date:
February 27, 2003 04:45
Subject:
Re: [PATCH] jumbo closure fix
Message ID:
5EDFC198-4A51-11D7-8177-003065D64CBE@nanisky.com

On torsdag, feb 27, 2003, at 13:19 Europe/Stockholm, Dave Mitchell 
wrote:

>
> On Thu, Feb 27, 2003 at 10:21:54AM +0100, A Bergman wrote:
>>> * There's a new global variable PL_cv_has_eval, that gets set during
>>> compilation if any eval-like constucts are found within the CV's ops.
>>>
>>
>> Where is this stored, per CV? What is it used for.
>
> It's just another global used during the compilation of CVs, like
> PL_padix, PL_comppad_name, etc etc. At the start of compiling a CV, we
> do SAVEI32(PL_cv_has_eval) and set it to 0. During the compile, we set 
> it
> to 1 if we discover any eval-like constructs. At the end of compiling 
> the
> CV, we check that whether it's got set, and if so, we pessimise any 
> anon
> CV's within scope. Thats all.
>
>

Aha,

So if we want to modify CVs later on, we just need o manually check if 
any code below it would have turn on the cv_has_eval flag.

Arthur


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