The Trunk: Environments-cwp.45.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Environments-cwp.45.mcz

commits-2
Colin Putney uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-cwp.45.mcz

==================== Summary ====================

Name: Environments-cwp.45
Author: cwp
Time: 18 January 2014, 10:33:24.663 am
UUID: dc729520-19d5-40f8-a33a-9bd755ab8ca2
Ancestors: Environments-cwp.44

Fill out the protocol for dealing with undeclared variables.

=============== Diff against Environments-cwp.44 ===============

Item was added:
+ ----- Method: Environment class>>cleanUp (in category 'class initialization') -----
+ cleanUp
+ self allInstancesDo:
+ [:env | env purgeUndeclared]!

Item was added:
+ ----- Method: Environment>>isUndeclared: (in category 'undeclared') -----
+ isUndeclared: aSymbol
+ ^ undeclared includesKey: aSymbol!

Item was changed:
+ ----- Method: Environment>>purgeUndeclared (in category 'undeclared') -----
- ----- Method: Environment>>purgeUndeclared (in category 'binding') -----
  purgeUndeclared
  undeclared removeUnreferencedKeys!

Item was changed:
+ ----- Method: Environment>>undeclare: (in category 'undeclared') -----
- ----- Method: Environment>>undeclare: (in category 'binding') -----
  undeclare: aSymbol
+ ^ (undeclared bindingOf: aSymbol) ifNil:
+ [undeclared add: aSymbol => nil]!
- ^ undeclared add: aSymbol => nil!

Item was added:
+ ----- Method: Environment>>undeclare:from: (in category 'undeclared') -----
+ undeclare: aSymbol from: aNamespace
+ | binding |
+ binding := self undeclare: aSymbol.
+ (aNamespace bindingOf: aSymbol) ifNotNil:
+ [:old |
+ aNamespace removeKey: aSymbol.
+ old becomeForward: binding].
+ ^ binding!