RFR: 8349211: Add support for intrusive trees to the utilities red-black tree [v7]
Casper Norrbin
cnorrbin at openjdk.org
Tue Feb 11 16:25:13 UTC 2025
On Mon, 10 Feb 2025 18:07:29 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Casper Norrbin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> empty base optimization reference
>
> src/hotspot/share/utilities/rbTree.inline.hpp line 192:
>
>> 190: template <typename K, typename V, typename COMPARATOR, typename ALLOCATOR>
>> 191: inline const typename RBTree<K, V, COMPARATOR, ALLOCATOR>::Cursor
>> 192: RBTree<K, V, COMPARATOR, ALLOCATOR>::cursor_find(const K& key) const {
>
> ```c++
> using Tree = RBTree<K, V, COMPARATOR, ALLOCATOR:
> using Cur = typename RBTree<K, V, COMPARATOR, ALLOCATOR>::Cursor;
>
>
> Though I'm pretty sure Thomas gave you a `typedef` for `Tree`, I don't think the `Cur` can be done with a `typedef`.
I don't think we can access `TreeType` here in any meaningful way, since that is a part of the tree class and we're outside the class here, and we would still need to specify the template parameters. But please correct me if I'm wrong :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23416#discussion_r1951169370
More information about the hotspot-dev
mailing list