[lworld] RFR: 8363846: [lworld] Make Class.isIdentityClass() non-native
Chen Liang
liach at openjdk.org
Tue Jul 22 23:47:07 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.
is_identity_class seems widely used in many areas, such as C2 - do we need to verify those usages?
src/hotspot/share/oops/instanceKlass.cpp line 3594:
> 3592: }
> 3593:
> 3594: void InstanceKlass::check_can_be_annotated_with_NullRestricted(InstanceKlass* type, Symbol* container_klass_name, TRAPS) {
I am surprised we still have this remnant of implicit construction now we have strict fields - shouldn't we replace this with strictness checks?
-------------
PR Review: https://git.openjdk.org/valhalla/pull/1514#pullrequestreview-3045150746
PR Review Comment: https://git.openjdk.org/valhalla/pull/1514#discussion_r2224022195
More information about the valhalla-dev
mailing list