On Fri, 3 Oct 2025 14:22:23 GMT, Frederic Parain <[email protected]> wrote:
>> src/hotspot/share/oops/markWord.hpp line 310:
>>
>>> 308: bool must_be_preserved() const {
>>> 309: return (!is_unlocked() || !has_no_hash() ||
>>> 310: (EnableValhalla && (is_larval_state() || is_inline_type() ||
>>> is_flat_array() || is_null_free_array())));
>>
>> Doesn't `is_inline_type` imply `is_larval_state`? (edit: other way around)
>
> The other way around, `is_larval_state` implies `is_inline_type` because only
> value classes instances can be in a larval state.
Thanks @fparain, I mixed it up when writing it down. I knew that, I promise 😅.
I think it would be good to introduce an `is_valhalla_concept` (naming may
vary) which ORs the larval, inline type, flat array and null free array bit
masks into a single mask. That way we can check it in just one call, which is
imo easier to read. Thoughts?
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1655#discussion_r2402155434