develooper Front page | perl.perl5.porters | Postings from April 2000

Re: [ID 20000409.003] Disappearing constant values

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
April 10, 2000 11:15
Subject:
Re: [ID 20000409.003] Disappearing constant values
Message ID:
200004101815.LAA25942@maul.ActiveState.com
On Mon, 10 Apr 2000 17:53:38 BST, Nick Ing-Simmons wrote:
>Gurusamy Sarathy <gsar@ActiveState.com> writes:
>>>Is setting PADTMP on a constant the right thing to do in the first place?
>>
>>Yes.  The constant SV is moved to the pad in order to keep it separate
>>between different threads that might share the same op tree.  
>
>Presumably then this is one of the 'named' kind - as we don't want
>constants being used as scratch. 

"Used as scratch" depends on the particular op.  While that is
usually the case, it is not always so.  (It is probably more
approprate to think of it as a "holding cell" rather than as
a "scratch value".)

>So perhaps there are three types:
>  1. named variables
>  2. constants 
>  3. Pad temporaries. 

There's also:

   4. GVs

Note that #2 and #4 are only applicable to ithreads.


Sarathy
gsar@ActiveState.com

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