with closures the block in allSubInstances will be a different object on each evaluation. �Pre closures this would have been a single BlockContext used for each evaluation of the block (and hence non-reentrant). �So you need to modify, e.g. by implementing allInstancesDo: in MethodContext class:
Pharo image: Pharo | Pharo-core
PharoCore1.0rc1 Latest update: #10502
VM: unix - i686 - linux-gnu - Pharo0.1 of 16 May 2008 [latest update:
#10074]
Steps to reproduce:
1.Object allSubInstances
It appears to be repeatedly adding its current context.
...Stan
OrderedCollection>>addLast:
� � � �Receiver: an OrderedCollection(an Object an Object an Object an
Object an Object an Object an Object...etc...
� � � �Arguments and temporary variables:
� � � � � � � �newObject: � � �[] in Object
class(Behavior)>>allSubInstances
� � � �Receiver's instance variables:
� � � � � � � �array: �an Array(an Object an Object an Object an Object an
Object an Object an ...etc...
� � � � � � � �firstIndex: � � 1
� � � � � � � �lastIndex: � � �1173805
OrderedCollection>>add:
� � � �Receiver: an OrderedCollection(an Object an Object an Object an
Object an Object an Object an Object...etc...
� � � �Arguments and temporary variables:
� � � � � � � �newObject: � � �[] in Object
class(Behavior)>>allSubInstances
� � � �Receiver's instance variables:
� � � � � � � �array: �an Array(an Object an Object an Object an Object an
Object an Object an ...etc...
� � � � � � � �firstIndex: � � 1
� � � � � � � �lastIndex: � � �1173805
[] in Object class(Behavior)>>allSubInstances
� � � �Receiver: Object
� � � �Arguments and temporary variables:
� � � � � � � �aCollection: � �[] in Object
class(Behavior)>>allSubInstances
� � � � � � � �x: � � �an OrderedCollection(an Object an Object an Object
an Object an Object an Ob...etc...
� � � �Receiver's instance variables:
� � � � � � � �superclass: � � ProtoObject
� � � � � � � �methodDict: � � a MethodDictionary(size 408)
� � � � � � � �format: � � � � 2
� � � � � � � �instanceVariables: � � �nil
� � � � � � � �organization: � ('*DynamicBindings' binding binding:
hasBinding removeBinding)
('...etc...
� � � � � � � �subclasses: � � {BalloonState. StandardFileMenuResult.
UndefinedObject. Boolean. Fi...etc...
� � � � � � � �name: � #Object
� � � � � � � �classPool: � � �a Dictionary(#DependentsFields->a
WeakIdentityKeyDictionary(MCWorkin...etc...
� � � � � � � �sharedPools: � �nil
� � � � � � � �environment: � �Smalltalk
� � � � � � � �category: � � � #'Kernel-Objects'
� � � � � � � �traitComposition: � � � {}
� � � � � � � �localSelectors: � � � � nil
...
--
View this message in context: http://n2.nabble.com/Issue-1633-Object-allSubInstances-appears-to-loop-forever-tp4187269p4187269.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project