On Thu, 9 Apr 2026 12:29:11 GMT, Paul Hübner <[email protected]> wrote:

>> src/hotspot/share/oops/markWord.hpp line 145:
>> 
>>> 143:       static_assert((bits) == 1 NOT_LP64(|| (bits) == 0));  \
>>> 144:       return mask_in_place((bits), (shift));                \
>>> 145:     }()
>> 
>> I want to be crystal clear when we're talking about one bit. So, 
>> `bit_in_place` is used when we have only one bit, and `mask_in_place` is 
>> used when have a consecutive set of bits. This disambiguates usage sites, 
>> IMHO.
>
> A brief comment about this in the source code would make it clearer, it 
> wasn't immediately obvious to me.

Added a comment.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2310#discussion_r3058009346

Reply via email to