On Fri, 6 Dec 2024 22:00:14 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

> This moves the modifier_flag computation to when InstanceKlass, ObjArrayKlass 
> and TypeArrayKlass are created.
> 
> Tested with jck:vm and tier1-4.

This seems reasonable, but I wonder if we can simplify things further for 
arrays - see below.

Future RFE: I also think we need to cleanup terminology i.e. "modifier flags" 
versus "access flags".

Thanks

src/hotspot/share/classfile/javaClasses.cpp line 1119:

> 1117:   // to support Class.getModifiers().  Instance classes recalculate
> 1118:   // the cached flags after the class file is parsed, but before the
> 1119:   // class is put into the system dictionary.

Is this comment already out-of-date? I'm trying to see where the flags are 
recomputed after parsing.

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?

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

PR Review: https://git.openjdk.org/jdk/pull/22618#pullrequestreview-2487697138
PR Review Comment: https://git.openjdk.org/jdk/pull/22618#discussion_r1875323314
PR Review Comment: https://git.openjdk.org/jdk/pull/22618#discussion_r1875322865

Reply via email to