RFR: 8366238: Improve RBTree API with stricter comparator semantics and pluggable validation/printing hooks. [v3]

Johan Sjölen jsjolen at openjdk.org
Mon Sep 1 09:16:44 UTC 2025


On Mon, 1 Sep 2025 09:04:17 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:
>> 
>>   albert feedback
>
> src/hotspot/share/utilities/rbTree.hpp line 65:
> 
>> 63: // Nodes are address stable and will not change during its lifetime.
>> 64: 
>> 65: enum class RBTreeOrdering : int { less = -1, equal = 0, greater = 1 };
> 
> Is assigning the elements to specific values necessary?

Personally, I'd prefer LT, EQ, GT to be the enum members. I'd like to see a `TotalOrdering` enum class in the future, to replace this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26981#discussion_r2313370588


More information about the hotspot-dev mailing list