RFR: 8349211: Add support for intrusive trees to the utilities red-black tree [v7]
Casper Norrbin
cnorrbin at openjdk.org
Tue Feb 11 16:15:05 UTC 2025
On Mon, 10 Feb 2025 17:52:43 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.hpp line 227:
>
>> 225: // Gets the cursor to the given node.
>> 226: Cursor get_cursor(const RBNode* node);
>> 227: const Cursor get_cursor(const RBNode* node) const;
>
> How about `cursor_of`, or just `cursor`?
Renamed both this and `cursor_find` to `cursor`
> src/hotspot/share/utilities/rbTree.hpp line 257:
>
>> 255: // For all nodes with key < old_node, must also have key < new_node
>> 256: // For all nodes with key > old_node, must also have key > new_node
>> 257: void replace_at_cursor(RBNode* new_node, const Cursor& cursor);
>
> `old_key`, `new_key`. Note, if I miss saying this in cpp file: We might want to run the verification code in an assert when this function is called. It's a pretty dangerous function that really requires that you know your stuff :-).
We already call `verify_self` in the implementation :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23416#discussion_r1951144934
PR Review Comment: https://git.openjdk.org/jdk/pull/23416#discussion_r1951146727
More information about the hotspot-dev
mailing list