Improve GetHashCode for IntPtr/UIntPtr on 64-bit.
authorKevin Jones <kevin@vcsjones.com>
Fri, 4 Mar 2016 17:22:36 +0000 (12:22 -0500)
committerKevin Jones <kevin@vcsjones.com>
Fri, 4 Mar 2016 21:43:41 +0000 (16:43 -0500)
commit7688c54a9a9938e45625937270e9d29deab62824
tree65ff1704702e767bf5bc8f133fe30507c12ac08f
parent4707152ea16ca35af2c87f43db3536001f1d0e6b
Improve GetHashCode for IntPtr/UIntPtr on 64-bit.

The GetHashCode behavior on IntPtr and UIntPtr truncated the upper 32 bits.
This change uses the behavior of long and ulong, respectively, to generate
the hash code.

UIntPtr no longer strips off the top-most bit for GetHashCode purposes.

Fix #3506
src/mscorlib/src/System/IntPtr.cs
src/mscorlib/src/System/UIntPtr.cs
tests/src/CoreMangLib/cti/system/intptr/intptrgethashcode.cs
tests/src/CoreMangLib/cti/system/uintptr/uintptrgethashcode.cs