RFR: 8352565: Add native method implementation of Reference.get() [v6]

Vladimir Ivanov vlivanov at openjdk.org
Thu May 29 18:47:55 UTC 2025


On Thu, 29 May 2025 18:43:31 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> We already have this to address that issue for the specific case of Reference.get:
>> https://github.com/openjdk/jdk/blob/4cf729cfac57c9aec692a52c1f3f95f2403e7958/src/hotspot/share/opto/compile.cpp#L786-L792
>> I think if we made the non-virtual native method be the intrinsic then we
>> could remove that special handling? Maybe that's a good enough reason to cover
>> the cost of renaming churn. Or maybe that's better done as a later cleanup?
>
> Yes, I find it much cleaner when intrinsic is non-virtual.
> 
>> Or maybe that's better done as a later cleanup?
> 
> Up to you. I'm fine with the current PR if you remove the comment referring to C2.

FTR the special case in `compile.cpp` you referred to is not used right now because there are no stand-alone compilations of `Reference::get` happening (I believe because it is also intrinsified in interpreter).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24315#discussion_r2114545824


More information about the hotspot-dev mailing list