On Wed, 19 Feb 2025 05:08:36 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Class.isInterface() can check modifier flags, Class.isArray() can check >> whether component mirror is non-null and Class.isPrimitive() needs a new >> final transient boolean in java.lang.Class that the JVM code initializes. >> Tested with tier1-4 and performance tests. > > src/java.base/share/classes/java/lang/Class.java line 1009: > >> 1007: private transient Object classData; // Set by VM >> 1008: private transient Object[] signers; // Read by VM, mutable >> 1009: private final transient char modifiers; // Set by the VM > > Why the change of type here? This is to improve the layout so the introduction of a boolean field does not increase the size of a Class object. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23572#discussion_r1961925828