[squeak-dev] BlockClosure vs BlockContext

Bert Freudenberg bert at freudenbergs.de
Wed Aug 4 16:27:46 UTC 2010


On 04.08.2010, at 00:50, John Chludzinski wrote:

> I have some code that fixed the values of temps (in a BlockContext) at the point of definition (using #fixTemps).  Now I'm using Seaside 3.0 on Squeak 4.1 and the values of the block's temps is set at the point of call (when I evaluate the block) - block are now BlockClosure's.  How do I fix the temps to be the values where the block is defined?  
> 
> #fixTemps is now a no-op.
> 
> ---John

Hmm. If we knew whether the closure actually used temps we could implement BlockClosure>>fixTemps as
	
	self hasTemps ifTrue: [
		self basicAt: self basicSize put: (self basicAt: self basicSize) copy]

But only the compiler seems to know, not the closure ...

- Bert -




More information about the Squeak-dev mailing list