On Mon, 9 Dec 2024 13:02:48 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> src/hotspot/share/oops/typeArrayKlass.hpp line 76: >> >>> 74: void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, >>> int length, TRAPS); >>> 75: >>> 76: // jvm support >> >> "jvm support" for what? I'm not even sure why we need >> `compute_modifier_flags` for array types when they have a fixed value. Can't >> we just hardwire them and only call `compute_modifier_flags` for >> instanceKlasses? > > ObjArrayKlass computes the modifier flags based on the bottom_klass, and > there is a place that calls compute_modifier_flags in an assert that requires > the virtual function, albeit for an assert, otherwise I would have made it > not a virtual function. Okay I see now - the access modifier part of the modifiers for a reference array comes from the element type. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22618#discussion_r1877650366