RFR: 8367397: Improve naming and terminology in regmask.hpp and regmask.cpp [v2]
Emanuel Peter
epeter at openjdk.org
Fri Sep 12 12:33:46 UTC 2025
On Fri, 12 Sep 2025 07:59:44 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:
>> src/hotspot/share/opto/regmask.hpp line 166:
>>
>>> 164: // indefinitely with ONE bits. Returns TRUE if mask is infinite or
>>> 165: // unbounded in size. Returns FALSE if mask is finite size.
>>> 166: bool is_infinite() const {
>>
>> "infinite" hides the fact that these unbounded bits are stack bits and not register bits, but `is_UnboundedStack` or `is_InfiniteStack` might be too verbose. How does `is_InfStack` sound?
>
> I like the suggestion, but should we not make it `is_infinite_stack` (current convention according to the style guide)? Or does historic conventions in `regmask.hpp` take precedence?
I would prefer `is_infinite_stack`.
`is_InfiniteStack` and `is_InfStack` only make sense if `InfiniteStack` is a class / name that is used widely in CamelCase. Like for `ContedLoopNode` -> `is_CountedLoop`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27215#discussion_r2344098469
More information about the hotspot-compiler-dev
mailing list