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

Matias Saavedra Silva matsaave at openjdk.org
Mon Nov 21 17:09:29 UTC 2022


On Fri, 18 Nov 2022 20:32:20 GMT, Coleen Phillimore <coleenp 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.

Looks good to me!

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?

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

Marked as reviewed by matsaave (Author).

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


More information about the hotspot-runtime-dev mailing list