Steven W McDougall <[EMAIL PROTECTED]> writes:
>1. All threads execute the same op tree
>Consider an op, like
>       fetch(b)
>If you actually compile a Perl program, like
>       $a = $b
>and then look at the op tree, you won't find the symbol "$b", or "b"
>anywhere in it. 

But it isn't very far away (at least for lexicals) ;-)

>The fetch() op does not have the name of the variable
>$b; rather, it holds a pointer to the value for $b.

It holds and index into the scratch-pad. Subs have scratch-pads 
which are cloned as needed during recursion etc. 

>If each thread is to have its own value for $b, then the fetch() op
>can't hold a pointer to *the* value. 

Each thread's view of the sub has its own scratch-pad - value is at same 
index in each.

Nick Ing-Simmons

Reply via email to