-
Enhancement
-
Resolution: Unresolved
-
P2
-
25
If the `String.hash` field is zero (i.e. its default value), the `@Stable` annotated field is not trusted. Eventhough `String.hashIsZero` is also `@Stable`, the VM cannot constant fold Sting::hashCode with hash = 0 as the VM first checks the `hash` value. For example `"".hashCode()` is not trusted.
We should refactor String to trust all hash values.
A benchmark that reproduces the problem is attached.
We should refactor String to trust all hash values.
A benchmark that reproduces the problem is attached.
- relates to
-
JDK-8354300 Fields in String are not trusted
-
- In Progress
-