[squeak-dev] The Trunk: Collections-ul.1002.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 30 15:32:13 UTC 2022


Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.1002.mcz

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

Name: Collections-ul.1002
Author: ul
Time: 30 March 2022, 5:32:03.565112 pm
UUID: 7d079f04-98dd-49ea-a0d0-6aaff26ee090
Ancestors: Collections-ul.1001

- do not try to rehash and compact immutable hashed collections in #rehashAllInstances and #compactAllInstances, respectively

=============== Diff against Collections-ul.1001 ===============

Item was changed:
  ----- Method: HashedCollection class>>compactAllInstances (in category 'initialize-release') -----
  compactAllInstances
+ 	"Do not use #allInstancesDo: because #compact may create new instances. Ignore immutable instances."
- 	"Do not use #allInstancesDo: because #compact may create new instances."
  
+ 	self allInstances do: [ :each |
+ 		each isReadOnlyObject ifFalse: [ each compact ] ]!
- 	self allInstances do: [ :each | each compact ]!

Item was changed:
  ----- Method: HashedCollection class>>rehashAllInstances (in category 'initialize-release') -----
  rehashAllInstances
+ 	"Do not use #allInstancesDo: because #rehash may create new instances. Ignore immutable instances."
- 	"Do not use #allInstancesDo: because #rehash may create new instances."
  
+ 	self allInstances do: [ :each | 
+ 		each isReadOnlyObject ifFalse: [
+ 			each rehash ] ]!
- 	self allInstances do: [ :each | each rehash ]!



More information about the Squeak-dev mailing list