<i18n dev> RFR: 8366178: Implement JEP 526: Lazy Constants (Second Preview) [v8]
Per Minborg
pminborg at openjdk.org
Thu Oct 16 12:23:26 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 incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 94 additional commits since the last revision:
- Revert back to Object::(hashCode/equals)
- Merge branch 'master' into lazy-constants
- Update src/java.base/share/classes/java/lang/LazyConstant.java
Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com>
- Define constant folding
- Rephrase trusted field text
- Reprhase text around the computing thread
- Add links around Error and Throwable
- Remove redundant field
- Add optimization where the computing function is returned directly
- Add benchmark of Optionals
- ... and 84 more: https://git.openjdk.org/jdk/compare/6cbed094...8fa4a4ca
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27605/files
- new: https://git.openjdk.org/jdk/pull/27605/files/5845a7a5..8fa4a4ca
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27605&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27605&range=06-07
Stats: 10612 lines in 265 files changed: 5868 ins; 4190 del; 554 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 i18n-dev
mailing list