Usage feedback rewriting jdk.internal.foreign.abi.BindingSpecializer
Brian Goetz
brian.goetz at oracle.com
Tue Mar 14 17:06:03 UTC 2023
>> Not sure what you are asking for here. There's no constant pool form
>> for "short constant". There's bipush/sipush, though. What bytecode
>> are you hoping to get out?
> I'd expect this:
>
> cb.constantZero(ShortType)
>
> to result in iconst_0 being emitted. Where 'cb' is an instance of
> `CodeBuilder`. (except, 'ShortType' would not be statically know, but
> derived from a Class<?> value that is fed in to the generation code).
Oh, I get it now -- you want the default field value for a given type
kind. Yes, that makes sense, something like
cb.loadDefault(typeKind)
More information about the classfile-api-dev
mailing list