RFR: 8189088: Add intrusive doubly-linked list utility [v7]

Stefan Johansson sjohanss at openjdk.org
Tue Oct 17 07:49:33 UTC 2023


On Mon, 16 Oct 2023 11:10:14 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> src/hotspot/share/utilities/intrusiveList.hpp line 994:
>> 
>>> 992:   const_reference operator[](size_type n) const {
>>> 993:     return nth_element(cbegin(), cend(), n);
>>> 994:   }
>> 
>> Do we need these operator[]'s?  Neither std::list nor boost::intrusive::list have such, and I don't think any of the
>> existing intrusive lists in HotSpot have such either.  Maybe there's no real use-case.  Removal would save
>> 25-30 lines.
>
> If we cannot find a  real use-case for HotSpot, then maybe we shouldn't include them.

I agree with Ivan.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15896#discussion_r1361668049


More information about the hotspot-dev mailing list