[lworld] RFR: 8363846: [lworld] Make Class.isIdentityClass() non-native

Roger Riggs rriggs at openjdk.org
Tue Jul 22 21:51:12 UTC 2025


On Tue, 22 Jul 2025 17:41:27 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> This moves isIdentityClass() implementation to Class.java, and checks within the JVM that is_identity_class() doesn't check the access flags for an ArrayKlass, since AccessFlags aren't initialized in ArrayKlasses.  The AccessFlags should be moved from Klass.hpp to InstanceKlass.cpp in mainline but that's a more complicated change and has several pieces.
> Added a test.
> Tested with tier1 locally.

test/jdk/valhalla/valuetypes/IsIdentityClassTest.java line 28:

> 26:  * @summary Test that IsIdentityClass and modifiers return true for flattened arrays.
> 27:  * @library /test/lib
> 28:  * @enablePreview

Since isIdentity depends on enable-preview, it should be run twice, once with and once without.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1514#discussion_r2223894810


More information about the valhalla-dev mailing list