Integrated: 8354300: Mark String.hash field @Stable
Per Minborg
pminborg at openjdk.org
Tue Apr 22 15:12:50 UTC 2025
On Mon, 14 Apr 2025 14:47:59 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> This PR proposes to add the `@Stable` annotation to `j.l.String.hash` and `j.l.String.hashIsZero`. This means the VM can trust these fields to never change which enables constant folding optimizations.
>
> This PR is tested in tier1, tier2, tier3, and tier4 which all pass.
This pull request has now been integrated.
Changeset: 072b8273
Author: Per Minborg <pminborg at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/072b8273a4c7bd75bce440e5f1184e2926ed0f78
Stats: 98 lines in 2 files changed: 96 ins; 0 del; 2 mod
8354300: Mark String.hash field @Stable
Reviewed-by: liach, shade, vlivanov
-------------
PR: https://git.openjdk.org/jdk/pull/24625
More information about the core-libs-dev
mailing list