On Fri, 6 Mar 2026 08:57:51 GMT, Ivan Walulya <[email protected]> wrote:
> LGTM!
>
> Minor suggestions
Thanks for reviewing!
> src/hotspot/share/oops/flatArrayKlass.cpp line 214:
>
>> 212: arrayOop d, int dst_pos, int length,
>> TRAPS) {
>> 213:
>> 214: assert(s->is_refArray() || s->is_flatArray(), "must be ref or flat
>> array");
>
> As mentioned elsewhere, maybe use `is_refined_objArray` here too.
Done.
> src/hotspot/share/oops/flatArrayKlass.cpp line 334:
>
>> 332: // refArray-to-flatArray
>> 333: assert(s->is_refArray(), "Expected refArray");
>> 334: assert(d->is_flatArray(), "Expected flatArray");
>
> can we use the oop_cast<> so we don't need these asserts here
Something like that sounds reasonable to me. Last time I looked at this I know
that both @fparain and @xmas92 was investigating what to do about casting and
asserts in the valhalla code. I propose that we decide the way forward and then
make a pass and clean these up after that.
> src/hotspot/share/oops/objArrayKlass.cpp line 226:
>
>> 224: switch (ad._kind) {
>> 225: case Klass::RefArrayKlassKind: {
>> 226: assert(class_loader_data() ==
>> element_klass()->class_loader_data(), "Sanity - cleanup?");
>
> Did you decide on how to proceed with this assert?
I've reverted this assert for now. I think this opens up for further
simplifications, but I will not try to make them in this PR.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/2117#issuecomment-4010544879
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2117#discussion_r2894687454
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2117#discussion_r2894680154
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2117#discussion_r2894686385