On Tue, 6 May 2025 09:09:50 GMT, Per Minborg <pminb...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/reflect/Method.java line 101:
>> 
>>> 99: 
>>> 100:     private static final ToIntFunction<Method> HASH_UPDATER =
>>> 101:             StableFieldUpdater.ofIntRaw(Method.class, 
>>> Unsafe.getUnsafe().objectFieldOffset(Method.class, "hash"), new 
>>> ToIntFunction<Method>() {
>> 
>> If we are using unsafe to get field offsets, why don't we just accept 
>> arguments to locate a MethodHandle (like those arguments to MhUtils)?
>
> Do you mean for interacting with the field or computing the hash?

Calling the method that computes hash.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25040#discussion_r2075217957

Reply via email to