RFR: 8265079: Implement VarHandle invoker caching [v2]

Jorn Vernee jvernee at openjdk.java.net
Wed Apr 14 11:38:16 UTC 2021


On Tue, 13 Apr 2021 15:24:13 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review comments:
>>   - Use boolean instead of index for var handle cache
>
> test/jdk/java/lang/invoke/TestVHInvokerCaching.java line 88:
> 
>> 86:         MethodHandles.Lookup lookup = lookup();
>> 87: 
>> 88:         for (Class<?> type : TEST_TYPES) {
> 
> A simpler approach would be to iterate over the fields of `Holder` and use `unreflectVarHandle`, then you can remove `TEST_TYPES`.

Yeah, that's a good idea. Fixed

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

PR: https://git.openjdk.java.net/jdk/pull/3439


More information about the core-libs-dev mailing list