About Hash code

Henrik Gedenryd h.gedenryd at open.ac.uk
Thu May 9 08:14:22 UTC 2002


Bergel Alexandre wrote:

> I know why.
> 
> because of :
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> veryDeepInner: deepCopier
> "Copy all of my instance variables."
> super veryDeepInner: deepCopier.
> version _ version copy.
> parentModule _ parentModule.
> neighborModules _ neighborModules copy.
> definedNames _ definedNames copy.
> exportedNames _ exportedNames copy.
> repository _ repository
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

I don't think that is the reason, identityHash is based on object identity
only, not contents. I'm not sure but I think the reason is that there are
only 4096 distinct values for the identityHash, and that they sometimes
collide. 

Does this happen for all modules? Or even always for this particular module?

Henrik




More information about the Squeak-dev mailing list