On Tue, 17 Mar 2026 10:48:56 GMT, Casper Norrbin <[email protected]> wrote:

> Hi everyone,
> 
> The current naming of the Valhalla-related `markWord` definitions is a bit 
> confusing and does not really match the mainline naming scheme. In 
> particular, the new `*_mask_in_place` constants are not just the 
> corresponding `*_mask` shifted into place. They are instead used as 
> classification masks, so they also include either lock bits or other Valhalla 
> bits. 
> 
> In this change I tried to make the structure and naming more regular, closer 
> to the pattern we already use in mainline, and also closer to how the 
> non-Valhalla bits are laid out here.
> 
> I split the definitions into a clearer flow:
> - Added `*_mask` for all Valhalla fields.
> - Kept `*_mask_in_place` for the Valhalla fields, but as the shifted version 
> of each corresponding mask.
> - Added new `*_pattern_mask` constants for the composite masks, to make it 
> clearer that these represent more than a single field mask. This also matches 
> the existing `*_pattern` naming better. 
> 
> As part of this, I updated all uses to the new names that match the intended 
> naming. Overall, this gives the `markWord` bit definitions a more consistent 
> and easier to follow structure.
> 
> Testing:
> - Tiers 1-3

Pretty mechanical, it does seem more consistent, even if I was unaware it was 
not. Thanks!

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

Marked as reviewed by mchevalier (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2238#pullrequestreview-4012136446

Reply via email to