On Fri, 8 May 2026 16:51:08 GMT, Dan Smith <[email protected]> wrote:
>> I didn't really like injecting 'identity'. java.lang.Class can figure this >> out optimally without the JVM's help. >> The JVM just sets the value based on whether it's an array and the >> ACC_IDENTITY access flag is set. >> >> set_is_identity(mirror(), k->is_array_klass() || k->is_identity_class()); >> >> You could cache the answer if you'd like in a field: >> value = !isArray() && getClassAccessFlags() has ACC_IDENTITY (why not in >> modifiers??) && !primitive && !isInterface(); >> >> Anyways, you can check the performance and fix this later. > > Good to know! Somehow I was thinking it was filtered out of `modifiers`, but > it's right there, so easy to check directly. > > I tried to see what happens if I delete the field & constructor parameter, > but stuff breaks without many breadcrumbs, so I'll file a bug and leave that > to somebody who knows what they're doing. 😄 Filed JDK-8384193 ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2397#discussion_r3210127325
