[squeak-dev] The Trunk: Collections-mt.876.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 26 16:24:02 UTC 2020


Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.876.mcz

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

Name: Collections-mt.876
Author: mt
Time: 26 February 2020, 5:24:00.015527 pm
UUID: 282a3821-8c7b-974f-b426-2cc481055eab
Ancestors: Collections-ul.875

Prepare 5.3rc2 --- Fixes #isEmpty for weak collections.

=============== Diff against Collections-ul.875 ===============

Item was changed:
  ----- Method: HashedCollection>>isEmpty (in category 'testing') -----
  isEmpty
+ 	"For non-weak collections, we can use the tally to speed up the empty check. For weak collections, we must use the traditional way because the tally is unreliable. Also see #size vs. #slowSize."
+ 
+ 	^ array class isWeak
+ 		ifFalse: [ tally = 0 ]
+ 		ifTrue: [ super isEmpty ]!
- 	^tally = 0!



More information about the Squeak-dev mailing list