RFR: 8314078: HotSpotConstantPool.lookupField() asserts due to field changes in ConstantPool.cpp [v2]

Ioi Lam iklam at openjdk.org
Tue Aug 15 15:10:19 UTC 2023


On Tue, 15 Aug 2023 08:54:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   @dougxc review: Added comments about rawIndex vs cpi
>
> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotConstantPool.java line 783:
> 
>> 781:     @Override
>> 782:     public JavaField lookupField(int rawIndex, ResolvedJavaMethod method, int opcode) {
>> 783:         final int cpi = compilerToVM().decodeFieldIndexToCPIndex(this, rawIndex);
> 
> I have the new warning here: `cpi` is not used. I guess it is correct, seeing how methods are accepting `rawIndex` now, right?

You're right. `cpi` is not used, as the next line uses `rawIndex` to obtain information about the field bytecode.


final int nameAndTypeIndex = getNameAndTypeRefIndexAt(rawIndex, opcode);


I'll remove the `cpi` line in my next JVMCI cleanup PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15237#discussion_r1294723660


More information about the graal-dev mailing list