On Fri, 13 Mar 2026 09:22:17 GMT, Paul Hübner <[email protected]> wrote:

> Looks good! Thanks for the rework.

Thanks for reviewing.

> Oh it's already merged. No wonder the approve button wasn't showing. 🙈

Ahh, sorry. I didn't realize that you were going to look at the PR. Thanks for 
taking a look and providing extra comments.

> src/hotspot/share/classfile/javaClasses.cpp line 1119:
> 
>> 1117:       }
>> 1118:     } else {
>> 1119:       assert(k->is_unrefined_objArray_klass(), "Must be");
> 
> Interesting that this `||` instead of `&&` slipped through... I've gone 
> through the rest of the code and I think all other instances have been fixed.

Yeah, I also search and checked all usages of `is_refArray_klass` and 
`is_flatArray_klass`.

> src/hotspot/share/gc/shared/collectedHeap.inline.hpp line 42:
> 
>> 40: 
>> 41: inline oop CollectedHeap::array_allocate(Klass* klass, size_t size, int 
>> length, bool do_zero, TRAPS) {
>> 42:   assert(!klass->is_unrefined_objArray_klass(), "ObjArrayKlass must 
>> never be used to allocate array instances directly");
> 
> Nit: double negative, I'd prefer `klass->is_refined_objArray_klass()`.

That would not work. The assert also accepts the klass to be a TypeArrayKlass 
and if I change to `klass->is_refined_objArray_klass()` then the assert will 
fail whenever one of those classes are passed in.

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

PR Comment: https://git.openjdk.org/valhalla/pull/2207#issuecomment-4053840213
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2207#discussion_r2930065525
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2207#discussion_r2930059159

Reply via email to