RFR: 8372845: Fold identity hash code if object is constant
Chen Liang
liach at openjdk.org
Tue Dec 2 00:16:14 UTC 2025
Folding identity hash as constant if the incoming argument is constant would be useful for quick map lookups, such as for the [Classifier proposal](https://openjdk.org/jeps/8357674). Currently, identity hash is not constant because it loads the object header/mark word. We can add an explicit bypass to load an existing hash eagerly instead.
-------------
Commit messages:
- Move around
- Constant fold identity hash
Changes: https://git.openjdk.org/jdk/pull/28589/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28589&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8372845
Stats: 88 lines in 4 files changed: 87 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/28589.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28589/head:pull/28589
PR: https://git.openjdk.org/jdk/pull/28589
More information about the hotspot-compiler-dev
mailing list