[Pkg] The Trunk: System-ar.271.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Feb 27 10:48:01 UTC 2010


Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.271.mcz

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

Name: System-ar.271
Author: ar
Time: 27 February 2010, 11:46:12.844 am
UUID: 0bd5fefb-3ae2-0c42-961a-ccc91ba64e13
Ancestors: System-ar.270

Changes the order in which cleanup is run from "subclass before superclass" to "superclass before subclass". The intention is to avoid having a generic superclass cleanup (HashedCollection rehashAll) undo a more specific cleanup (MethodDictionary compactAllInstances).


=============== Diff against System-ar.270 ===============

Item was changed:
  ----- Method: SystemDictionary>>cleanUp: (in category 'housekeeping') -----
  cleanUp: aggressive
  	"Clean up. When aggressive is true, this will destroy projects, change sets, etc."
  	"Smalltalk cleanUp: false"
  	"Smalltalk cleanUp: true"
  	| classes |
  	aggressive ifTrue:[
  		"Give the user a chance to bail"
  		(self confirm: 'Aggressive cleanup will destroy projects, change sets and more.
  Are you sure you want to proceed?') ifFalse:[^self].
  	].
  
  	"Find all classes implementing #cleanUp or cleanUp:"
  	classes := Smalltalk allClasses select:[:aClass| 
  		(aClass class includesSelector: #cleanUp) 
  			or:[aClass class includesSelector: #cleanUp:]
  	].
  
+ 	"Arrange classes in superclass order, superclasses before subclasses.
+ 	This will ensure that specific cleanup (like MethodDictionary compaction)
+ 	will run after generic superclass cleanup (HashedCollection rehashing).
+ 	Otherwise generic superclass cleanup might undo specific one (in this
+ 	case rehashing will undo a good bit of MD compaction)."
+ 	classes := ChangeSet superclassOrder: classes.
- 	"Arrange them in inverse superclass order, subclasses before superclasses"
- 	classes := (ChangeSet superclassOrder: classes) reversed.
  
  	"Run the cleanup code"
  	classes 
  		do:[:aClass| aClass cleanUp: aggressive]
  		displayingProgress:[:aClass| 'Cleaning up in ', aClass name].!



More information about the Packages mailing list