RFR: 8297284: ResolutionErrorTable's key is wrong [v2]

Coleen Phillimore coleenp at openjdk.org
Tue Nov 29 14:27:59 UTC 2022


On Tue, 29 Nov 2022 01:45:06 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Matias comments
>
> src/hotspot/share/classfile/resolutionErrors.hpp line 57:
> 
>> 55:   // index of another entry in the table.
>> 56:   static const int CPCACHE_INDEX_MANGLE_VALUE = 1000000;
>> 57: 
> 
> Do we still need `CPCACHE_INDEX_MANGLE_VALUE` and `encode_cpcache_index(int index)`? The comment around that function says that `index` is negative, so it shouldn't be confused with regular cp indices which are non-negative.

I wanted to leave that in so that there's an assert that it's negative first.  The whole cpCache index thing is something that @matias9927 is trying to rationalize with his ResolvedIndyInfo array - should we continue to use negative indexes in the bytecode stream or not?  We think not so he'll clean this part up, and if we do we'll need some encoding like what's in CPCACHE_INDEX_MANGLE_VALUE.  Maybe the mangle value should be negative and he can change his positive indexes to negative to distinguish them from constant pool indexes.

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

PR: https://git.openjdk.org/jdk/pull/11244


More information about the hotspot-runtime-dev mailing list