RFR: 8348853: Fold layout helper check for objects implementing non-array interfaces [v2]
Marc Chevalier
mchevalier at openjdk.org
Mon Mar 31 06:49:50 UTC 2025
On Fri, 28 Mar 2025 19:24:22 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Almost!
>>
>> return !TypeAryPtr::_array_interfaces->contains(this);
>>
>> Contains is about TypeInterfaces, that is set of interfaces. So I just need to check that `this` is not a sub-set of array interfaces. That should do it.
>
> Now I'm confused, isn't this what I proposed? I didn't check the exact syntax, I just wondered if the `TypeInterfaces::contains` method couldn't be used instead of adding a new method.
Yes, totally! It's just a detail difference. But there is another question: whether we still want `has_non_array_interface` has a wrapper for this call with a more explicit name, or if we simply inline your suggestion on the callsite of `has_non_array_interface`. I tend toward the first, I like explicit names, and I suspect it might be useful in more than one place, but not a strong opinion.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24245#discussion_r2020483393
More information about the hotspot-compiler-dev
mailing list