[Pkg] The Trunk: System-ul.185.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 1 05:05:47 UTC 2009


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

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

Name: System-ul.185
Author: ul
Time: 30 November 2009, 5:16:10 am
UUID: 9fe63fab-5342-9240-aa04-748fb8c843de
Ancestors: System-dtl.184

Part 1 of SystemDictionary hash change (use #hash instead of #identityHash)

=============== Diff against System-dtl.184 ===============

Item was added:
+ ----- Method: SystemDictionary>>scanForEmptySlotFor: (in category 'private') -----
+ scanForEmptySlotFor: anObject
+ 	"Scan the key array for the first slot containing an empty slot (indicated by a nil). Answer the index of that slot. This method will be overridden in various subclasses that have different interpretations for matching elements."
+ 	
+ 	| index start |
+ 	index := start := anObject hash \\ array size + 1.
+ 	[ 
+ 		(array at: index) ifNil: [ ^index ].
+ 		(index := index \\ array size + 1) = start ] whileFalse.
+ 	self errorNoFreeSpace!

Item was added:
+ ----- Method: SystemDictionary>>scanFor: (in category 'private') -----
+ scanFor: anObject
+ 	"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or raise an error if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements."
+ 
+ 	| index start |
+ 	CollectionRehashingUtility quickRehashBecause: #systemDictionaryScanForChanged.
+ 	index := start := anObject hash \\ array size + 1.
+ 	[ 
+ 		| element |
+ 		((element := array at: index) == nil or: [ element key == anObject ])
+ 			ifTrue: [ ^index ].
+ 		(index := index \\ array size + 1) = start ] whileFalse.
+ 	self errorNoFreeSpace!



More information about the Packages mailing list