RFR: 8297284: ResolutionErrorTable's key is wrong for indy

Coleen Phillimore coleenp at openjdk.org
Mon Nov 21 17:56:32 UTC 2022


On Mon, 21 Nov 2022 17:03:27 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> The resolution error table had a trick for the lookup key of adding constant pool index into constant pool address because that key was assumed to be in the range of the constant pool, so unique.  For failed indy resolution, we also use the resolution error table and the index is not relative to the constant pool, so the key is potentially not unique.  Created a Key class for the table and moved the cpool and index into that.  Now the ResolutionErrorEntry just has the messages.
>> 
>> Tested tier1-4.
>
> src/hotspot/share/classfile/resolutionErrors.cpp line 53:
> 
>> 51: 
>> 52:   static bool equals(const ResolutionErrorKey& l, const ResolutionErrorKey& r) {
>> 53:     return l._cpool == r._cpool && l._index == r._index;
> 
> This should work correctly, but maybe use parentheses here for readability?

ok!

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

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


More information about the hotspot-runtime-dev mailing list