On Mon, 28 Apr 2025 11:51:23 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify FFM linker warmup > > src/java.base/share/classes/jdk/internal/foreign/abi/NativeEntryPoint.java > line 57: > >> 55: if (!(o instanceof CacheKey other)) return false; >> 56: >> 57: return methodType == other.methodType && abi == other.abi && >> capturedStateMask == other.capturedStateMask > > Is this correct? The old code was using `MethodType::equals`, but now we seem > to use `==` instead. I suppose the idea is that method types are interned, > and their `equals` method is only really meaningful when checking whether a > method type with same shape has already been interned? Yep, equals are only used on primordial method types for the intern table. Identity is significant for invokers sharing. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24742#discussion_r2063551903