RFR: 8372845: C2: Fold identity hash code if object is constant [v3]
Chen Liang
liach at openjdk.org
Mon Dec 15 19:49:55 UTC 2025
On Wed, 10 Dec 2025 17:17:13 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> I can't find a way to access the identity hash code without compilation. Would something like a method that calls System.identityHashCode but is not inlied work?
>
> You could compute the result in the static initializer, it should therefore be computed in the interpreter. And then add a `@Check` method to compare the `testSum` value from the compiler.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28589#discussion_r2620621850
More information about the hotspot-dev
mailing list