On Wed, 17 Apr 2024 22:43:38 GMT, Dean Long <dl...@openjdk.org> wrote:

>> Before [JDK-8307190](https://bugs.openjdk.org/browse/JDK-8307190), 
>> [JDK-8309673](https://bugs.openjdk.org/browse/JDK-8309673), and 
>> [JDK-8301995](https://bugs.openjdk.org/browse/JDK-8301995), invokedynamic 
>> operands needed to be rewritten to encoded values to better distinguish indy 
>> entries from other cp cache entries. The above changes now distinguish 
>> between entries with `to_cp_index()` using the bytecode, which is now 
>> propagated by the callers.
>> 
>> The encoding flips the bits of the index so the encoded index is always 
>> negative, leading to access errors if there is no matching decode call. 
>> These calls are removed with some methods adjusted to distinguish between 
>> indices with the bytecode. Verified with tier 1-5 tests.
>
> src/hotspot/share/classfile/resolutionErrors.hpp line 60:
> 
>> 58: 
>> 59:   // This function is used to encode an invokedynamic index to 
>> differentiate it from a
>> 60:   // constant pool index.  It assumes it is being called with a index 
>> that is less than 0
> 
> Is this comment still correct?

The last sentence is no longer valid, thanks for catching this!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18819#discussion_r1570969645

Reply via email to