[lworld] RFR: 8370714: [lworld] Reimplement System.identityHashCode for Value Objects
Chen Liang
liach at openjdk.org
Sat Dec 6 00:53:25 UTC 2025
On Fri, 5 Dec 2025 21:24:41 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> The alternate hashcode compution is enabled when the alternate subsitutability method is enabled with: `-XX:+UseAltSubstitutabilityMethod`.
> The IdentityHashCode is computed using the map of field offsets and sizes from Unsafe.
> The basis of hashCode is the the hashCode of the object's class mixing in the values from the memory where the fields are placed and the hashCode of each reference.
>
> The changes to Hotspot invoke the original or the alternate Java method based on the VM `UseAltSubstitutabilityMethod` command line flag.
Ok
-------------
Marked as reviewed by liach (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1773#pullrequestreview-3546806156
More information about the valhalla-dev
mailing list