On Mon, 14 Apr 2025 14:47:59 GMT, Per Minborg <pminb...@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 does not fix the lack of constant folding.

The regression for 
https://github.com/openjdk/jdk/pull/23972#issuecomment-2792664301 appears again 
if the `Map::get` call uses `""` instead of `"x"` or `"y"`.

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

Changes requested by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24625#pullrequestreview-2765156275

Reply via email to