On Tue, 2 Dec 2025 23:20:12 GMT, Chen Liang <[email protected]> wrote:

>> Since access descriptor is created for each VH operation site, we can 
>> optimistically cache the adapted method handle in a site if the site 
>> operates on a constant VH.  Used a C2 IR test to verify such a setup through 
>> an inexact VarHandle invocation can be constant folded through (previously, 
>> it was blocked by `asType`)
>
> Chen Liang has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains eight additional commits since 
> the last revision:
> 
>  - Rollback getAndAdd for now
>  - Redundant change
>  - Merge branch 'master' of https://github.com/openjdk/jdk into 
> fix/vh-adapt-cache
>  - Stage
>  - Review tweaks
>  - Tweak VH usage in some classes
>  - Logical fallacy
>  - 8160821

test/micro/org/openjdk/bench/java/lang/invoke/VarHandleExact.java line 81:

> 79: 
> 80:     @Benchmark
> 81:     public void generic_returnDroppingInvocation() {

What about "all-generic" case (` { generic.getAndAdd(data, 42); }`)?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28585#discussion_r2583363907

Reply via email to