On Fri, 6 Mar 2026 06:35:04 GMT, Stefan Karlsson <[email protected]> wrote:
>> I have a bunch of patches to remove some code duplication, redundant setting
>> of fields, unneeded dispatch code.
>>
>> I've tested this with tier1-3.
>>
>> I'm opening this up as one PR, depending on #2033, but it could be split up
>> into multiple dependent PRs. It could be good to look at each commit
>> individually when making a first pass of over this PR.
>>
>> I'll add a guide to the individual commits as a comment after the summary.
>
> Stefan Karlsson has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Review: simplify is refined array check
LGTM!
Minor suggestions
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.
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
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?
-------------
Marked as reviewed by iwalulya (no project role).
PR Review:
https://git.openjdk.org/valhalla/pull/2117#pullrequestreview-3902315481
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2117#discussion_r2894557064
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2117#discussion_r2894567980
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2117#discussion_r2894580456