RFR: 8315771: [JVMCI] Resolution of bootstrap methods with int[] static arguments [v5]

Sacha Coppey duke at openjdk.org
Fri Sep 8 14:40:42 UTC 2023


On Fri, 8 Sep 2023 13:23:06 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> Sacha Coppey has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add CachedBSMArgs to resolve arguments lazily instead of letting the user do so
>
> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ConstantPool.java line 168:
> 
>> 166:          * Gets the static arguments with which the bootstrap method will be invoked.
>> 167:          *
>> 168:          * An argument of type {@link PrimitiveConstant} represents a {@code CONSTANT_Dynamic_info}
> 
> Can it not be an index to any valid LDC constant? This is implied by this code in your Graal PR:
> 
> if (constant instanceof PrimitiveConstant primitiveConstant) {
>     int argCpi = primitiveConstant.asInt();
>     Object argConstant = lookupConstant(argCpi, opcode == Opcodes.INVOKEDYNAMIC ? Opcodes.LDC : opcode, allowBootstrapMethodInvocation);

Oh yes, sorry, I will fix this documentation.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15588#discussion_r1319958367


More information about the hotspot-compiler-dev mailing list