RFR: 8367397: Improve naming and terminology in regmask.hpp and regmask.cpp
Daniel Lundén
dlunden at openjdk.org
Thu Sep 11 10:13:11 UTC 2025
Some names in `regmask.hpp` and `regmask.cpp` are unclear and should be improved.
### Changeset
- Rename `RM_SIZE` to `RM_SIZE_IN_INTS` and `_RM_I` to `_RM_INT` to make it clear that these refer to integer-sized (32-bit) array elements.
- Rename `_RM_SIZE` to `_RM_SIZE_IN_WORDS` and `_RM_UP` to `_RM_WORD` to make it clear that these refer to machine-word-sized (32 or 64 bits depending on platform) array elements.
- Rename `_RM_MAX` to `_RM_WORD_MAX_INDEX` for clarity.
- Rename `is_AllStack` to `is_infinite` (and related resulting changes in comments and local variables). The old terminology "all-stack", referring to the infinite register mask bits, is misleading (as pointed out by @eme64 in https://github.com/openjdk/jdk/pull/20404#discussion_r2316234008). The reason is that the infinite bits do not represent *all* stack bits. Some stack bits are instead part of the non-infinite bits of the register mask.
### Testing
- [GitHub Actions](https://github.com/dlunde/jdk/actions/runs/17638365968)
- `tier1` and HotSpot parts of `tier2` and `tier3` (and additional Oracle-internal testing) on Windows x64, Linux x64, Linux aarch64, macOS x64, and macOS aarch64.
-------------
Commit messages:
- Fix issue
Changes: https://git.openjdk.org/jdk/pull/27215/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27215&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8367397
Stats: 108 lines in 12 files changed: 1 ins; 0 del; 107 mod
Patch: https://git.openjdk.org/jdk/pull/27215.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27215/head:pull/27215
PR: https://git.openjdk.org/jdk/pull/27215
More information about the hotspot-compiler-dev
mailing list