'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 18 May 2003 at 8:53:21 pm'! "Change Set: SharedPools Date: 18 May 2003 Author: Andreas Raab Adds a common superclass for pools."! Object subclass: #SharedPool instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'System-Pools'! !SharedPool commentStamp: '' prior: 0! A shared pool represents a set of bindings which are accessible to all classes which import the pool in its 'pool dictionaries'. SharedPool is NOT a dictionary but rather a name space. Bindings are represented by 'class variables' - as long as we have no better way to represent them at least.! !SharedPool class methodsFor: 'name lookup' stamp: 'ar 5/18/2003 17:46'! bindingOf: varName "Answer the binding of some variable resolved in the scope of the receiver" | aSymbol binding | aSymbol := varName asSymbol. "First look in classVar dictionary." binding := self classPool bindingOf: aSymbol. binding ifNotNil:[^binding]. "Next look in shared pools." self sharedPools do:[:pool | binding := pool bindingOf: aSymbol. binding ifNotNil:[^binding]. ]. "subclassing and environment are not preserved" ^nil! ! !SharedPool class methodsFor: 'name lookup' stamp: 'ar 5/18/2003 20:33'! bindingsDo: aBlock ^self classPool bindingsDo: aBlock! ! !SharedPool class methodsFor: 'name lookup' stamp: 'ar 5/18/2003 18:14'! classBindingOf: varName "For initialization messages grant the regular scope" ^super bindingOf: varName! !