RFR: 8352579: Refactor CDS legacy optimization for lambda proxy classes [v5]

Calvin Cheung ccheung at openjdk.org
Wed Mar 26 22:19:11 UTC 2025


On Wed, 26 Mar 2025 22:11:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Since JDK 16, CDS has provided limited optimization for lambda expressions. This has been superseded by JEP 483 and is useful only when `-XX:+AOTClassLinking` is not enabled (which is the case for the default CDS archive, for compatibility reasons).
>> 
>> The "legacy lambda optimization" may eventually be removed. For the time being, we should consolidate the code into a single source code and clearly mark its uses. This way we can avoid confusion with the JEP 483 code for supporting lambdas (and other java.lang.invoke functionalities).
>
> Ioi Lam 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 seven additional commits since the last revision:
> 
>  - added back jfr/jfrEvents.hpp as it is needed by EventClassLoad
>  - Merge branch 'master' into 8352579-refactor-cds-legacy-lambda-optimizations
>  - @calvinccheung comments
>  - @matias9927 offline comments - consolidated two functions with identical names
>  - Fixed infinite recursion compiler warning
>  - Fixed github action build failures
>  - 8352579: Refactor CDS legacy optimization for lambda proxy classes

Looks good.

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

Marked as reviewed by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24145#pullrequestreview-2718730762


More information about the hotspot-dev mailing list