RFR: 8312262: Klass::array_klass() should return ArrayKlass pointer

Dean Long dlong at openjdk.org
Thu Jul 27 20:18:51 UTC 2023


On Thu, 27 Jul 2023 19:22:52 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> This is a simple change to make array_klass() return ArrayKlass (the first dimension of TypeArrayKlass is a TypeArrayKlass so can't use ObjArrayKlass), higher_dimension is always an ObjArrayKlass and lower_dimension can be a TypeArrayKlass.  The change removes some casts.
> Tested with tier1 linux/macosx/windows on x86 and aarch64.

src/hotspot/share/oops/arrayKlass.hpp line 62:

> 60:   ObjArrayKlass* higher_dimension() const     { return _higher_dimension; }
> 61:   inline ObjArrayKlass* higher_dimension_acquire() const; // load with acquire semantics
> 62:   void set_higher_dimension(ObjArrayKlass* k) { _higher_dimension = k; }

The set_higher_dimension() function seems to be unused.  Should we remove it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15059#discussion_r1276777259


More information about the hotspot-dev mailing list