[squeak-dev] The Trunk: Kernel-ul.312.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 1 04:40:41 UTC 2009


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

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

Name: Kernel-ul.312
Author: ul
Time: 1 December 2009, 4:19:45 am
UUID: 5b9007f4-b0f3-1e42-bf32-5a0efbeaae0f
Ancestors: Kernel-nice.307

Added #scaledIdentityHash.
Part 1 of updating Object >> hash.

=============== Diff against Kernel-nice.307 ===============

Item was added:
+ ----- Method: SmallInteger>>scaledIdentityHash (in category 'comparing') -----
+ scaledIdentityHash
+ 	"For identityHash values returned by primitive 75, answer
+ 	such values times 2^18.  Otherwise, match the existing
+ 	identityHash implementation"
+ 	
+ 	^self!

Item was added:
+ ----- Method: ProtoObject>>scaledIdentityHash (in category 'comparing') -----
+ scaledIdentityHash
+ 	"For identityHash values returned by primitive 75, answer
+ 	such values times 2^18.  Otherwise, match the existing
+ 	identityHash implementation"
+ 
+ 	^self identityHash * 262144 "bitShift: 18"!

Item was changed:
  ----- Method: Object>>hash (in category 'comparing') -----
  hash
  	"Answer a SmallInteger whose value is related to the receiver's identity.
  	May be overridden, and should be overridden in any classes that define = "
  
+ 	CollectionRehashingUtility quickRehashBecause: #objectHashChanged.
+ 	^self scaledIdentityHash!
- 	^ self identityHash!




More information about the Squeak-dev mailing list