[squeak-dev] Re: [Vm-dev] New Window VM (Closures, FT2Plugin, Large Cursors)

Andreas Raab andreas.raab at gmx.de
Tue Mar 10 03:14:42 UTC 2009


Keith Hodges wrote:
> Bug found:
> 
> | c |
> c := 0.
> SystemNavigation default allObjectsDo: [ :a | c := c + 1 ].
> c.
> 
> doesn't seem to ever finish.

Ah, yes! Fix like this:

MethodContext class>>allInstancesDo: aBlock
	"Only count until thisContext"
	| inst next |
	inst := self someInstance.
	[inst == thisContext] whileFalse:[
		next := inst nextInstance.
		aBlock value: inst.
		inst := next]

(otherwise activation of aBlock will create another context)

Cheers,
   - Andreas



More information about the Squeak-dev mailing list