RFR: 8367397: Improve naming and terminology in regmask.hpp and regmask.cpp [v4]

Emanuel Peter epeter at openjdk.org
Fri Sep 12 12:43:13 UTC 2025


On Fri, 12 Sep 2025 12:33:34 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:

>> src/hotspot/share/opto/regmask.hpp line 65:
>> 
>>> 63:   LP64_ONLY(STATIC_ASSERT(is_aligned(RM_SIZE_IN_INTS, 2)));
>>> 64: 
>>> 65:   static const unsigned int _WordBitMask = BitsPerWord - 1U;
>> 
>> You could also remove the `_` here. I suppose we keep `CamelCase` here because to keep it parallel to `BitsPerWord`. What do you think @dean-long ?
>
> I renamed this entire group of constants to use the same style (uppercase separated by `_`, without leading `_`). It is now `WORD_BIT_MASK`. I think it makes more sense to use the same style across `regmask.hpp`, rather than following styles in other files.

Nice!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27215#discussion_r2344123876


More information about the hotspot-compiler-dev mailing list