RFR: 8372845: Fold identity hash code if object is constant
Vladimir Ivanov
vlivanov at openjdk.org
Tue Dec 2 22:28:01 UTC 2025
On Tue, 2 Dec 2025 20:58:23 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>>> I'm not sure it makes sense to support Object::hashCode unless C2 can eliminate generate_virtual_guard for a constant receiver. I'd just limit constant folding to !is_virtual case for now.
>>
>> Or, alternatively, inspect constant object's v-table during compilation and ensure that corresponding slot points at `Object::hashCode`.
>
> @iwanowww please fix title to match JBS.
@vnkozlov I can't since I'm not the author of the PR :-)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28589#issuecomment-3604211003
More information about the hotspot-runtime-dev
mailing list