RFR: 8348853: Fold layout helper check for objects implementing non-array interfaces
Tobias Hartmann
thartmann at openjdk.org
Fri Mar 28 19:27:15 UTC 2025
On Fri, 28 Mar 2025 09:38:19 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> src/hotspot/share/opto/type.cpp line 3684:
>>
>>> 3682: }
>>> 3683:
>>> 3684: bool TypeInterfaces::has_non_array_interface() const {
>>
>> What about using `TypeAryPtr::_array_interfaces->contains(_interfaces);` instead?
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24245#discussion_r2019219027
More information about the hotspot-compiler-dev
mailing list