On Thu, 5 Mar 2026 08:11:16 GMT, Marc Chevalier <[email protected]> wrote:
> Isn't `flatArrayOopDesc::obj_at_is_null` semantically very similar to > `flatArrayOopDesc::null_marker_of_obj_at`? Except that "object == null <=> > null marker == 0" (it can be confusing to see that a `true` null marker means > non-null, but I think about it as the null marker has the same nullness as > the object). We also have that `flatArrayOopDesc::obj_at_is_null` returns false for a null restricted array, while `flatArrayOopDesc::null_marker_of_obj_at` is invalid to call on a null restricted array (might crash, assert or return an incorrect answer). (We might want to assert this precondition directly in `null_marker_of_obj_at`, it is also unclear why it has a TRAP overload, but maybe that is vestigial.) I cannot see that we currently use `null_marker_of_obj_at`. It looks like you introduced this. I assumed it was for the compiler, returning a jboolean is not very useful in the C++ code. I was thinking of implementing `null_marker_of_obj_at` in terms of `obj_at_is_null`. I also plan to go over and look form more of the explicit code that does value payload accesses and evaluate if using the ValuePayload abstraction is better. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/2157#issuecomment-4003331107
