RFR: 8366178: Implement JEP 526: Lazy Constants (Second Preview) [v25]
Per Minborg
pminborg at openjdk.org
Wed Nov 12 10:07:39 UTC 2025
> Implement JEP 526: Lazy Constants (Second Preview)
>
> The lazy list/map implementations are broken out from `ImmutableCollections` to a separate class.
>
> The old benchmarks are not moved/renamed to allow comparison with previous releases.
>
> `java.util.Optional` is updated so that its field is annotated with `@Stable`. This is to allow `Optional` instances to be held in lazy constants and still provide constant folding.
Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 112 commits:
- Clarify toString spec
- Merge branch 'master' into lazy-constants
- Add @AOTSafeClassInitializer
- Address comments in PR
- Fix merge mistake
- Merge master
- Rework toString implementations
- Update after doc comments
- Merge branch 'master' into lazy-constants
- Revert the AbstractMap.keySet @Stable annotation
- ... and 102 more: https://git.openjdk.org/jdk/compare/76a1109d...1f439bec
-------------
Changes: https://git.openjdk.org/jdk/pull/27605/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27605&range=24
Stats: 8445 lines in 60 files changed: 3836 ins; 4490 del; 119 mod
Patch: https://git.openjdk.org/jdk/pull/27605.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27605/head:pull/27605
PR: https://git.openjdk.org/jdk/pull/27605
More information about the core-libs-dev
mailing list