On Thu, 14 Oct 2021 00:54:57 GMT, Mandy Chung <mch...@openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/reflect/MethodHandleAccessorFactory.java >> line 151: >> >>> 149: var setter = isReadOnly ? null : >>> JLIA.unreflectField(field, true); >>> 150: Class<?> type = field.getType(); >>> 151: if (type == Boolean.TYPE) { >> >> dumb question: any reason why `boolean.class` (which is compiled to a LDC) >> is not used? > > I only see `boolean.class` compiled to `getstatic Boolean.TYPE`. Is there a > javac flag to compile it to a LDC? The LDC bytecode instruction for a class takes a class name not a descriptor as parameter, so there is no way to encode LDC Z. Valhalla may change that. ------------- PR: https://git.openjdk.java.net/jdk/pull/5027