On Mon, 12 Oct 2026 10:33:22 GMT, Stefan Karlsson <[email protected]> wrote:
>> src/hotspot/share/oops/oop.inline.hpp line 228:
>>
>>> 226: }
>>> 227:
>>> 228: template<> inline bool oopDesc::is<instanceOop>() const { return
>>> is_instance(); }
>>
>> I am sure it is fine, but can you ballpark `time make hotspot` before and
>> after this change? Do these template instantiations (?) cost us anything
>> compile-time-wise?
>
> My experience with adding small template / inlines like this is that it
> doesn't add anything that shows up as concrete increases in the compile times.
>
> I ran a small test on my local machine and I can't see any build-time
> differences before and after this change.
Yeah, as long as a simple test does not show regressions -- when they happen,
they are massive -- we are fine.
>> src/hotspot/share/oops/oop.inline.hpp line 241:
>>
>>> 239: }
>>> 240:
>>> 241: bool oopDesc::is_refined_objArray() const { return
>>> klass()->is_refined_objArray_klass(); }
>>
>> This seems to belong in the `oopDesc::is_*()` block a few lines above?
>
> My thinking was the the block above should only contain the 1:1 type checks
> and things that want to check more than that was moved out of the block. This
> function is an oddity that checks if the type is either of two types, so I
> relegated it from that block.
>
> I did the same with `is_array_with_oops`.
>
> You still want me to move it back?
It just looks like yet another of these cases:
bool oopDesc::is_typeArray() const { return
klass()->is_typeArray_klass(); }
bool oopDesc::is_objArray() const { return
klass()->is_objArray_klass(); }
bool oopDesc::is_refArray() const { return
klass()->is_refArray_klass(); }
bool oopDesc::is_flatArray() const { return
klass()->is_flatArray_klass(); }
It is an implementation detail there is `||` behind
`klass()->is_refined_objArray_klass()` -- maybe at some point it would become a
direct query.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33287#discussion_r4247355217
PR Review Comment: https://git.openjdk.org/jdk/pull/33287#discussion_r4247382390