On Wed, 19 Feb 2025 21:16:51 GMT, Dean Long <dl...@openjdk.org> wrote:
>> This is a good question. The heapwalker walks through dead mirrors so I >> can't assert that a null klass field matches our boolean setting but I don't >> know why this never asserts (can't find any instances in the bug database) >> but it seems like it could. I'll use the bool field in the mirror in the >> assert though but not in the return since the caller likely will fetch the >> klass pointer next. > >> ... but not in the return since the caller likely will fetch the klass >> pointer next. > > I notice that too. Callers are using is_primitive() to short-circuit calls > to as_Klass(), which means they seem to be aware of this implementation > detail when maybe they shouldn't. There are 136 callers so yes, it might be something that shouldn't be known in this many places. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23572#discussion_r1964492501