RFR: 8295486: Inconsistent constant field values observed during compilation

Vladimir Ivanov vlivanov at openjdk.org
Mon Jan 9 18:29:53 UTC 2023


On Sat, 7 Jan 2023 03:34:28 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> but there should be a way for method to deoptimize if stable field value changes past method registration.

It is not required for proper `@Stable` support and, moreover, doesn't make much sense considering how the API is shaped.

`@Stable` is not part of public API (has no effect in non-trusted code) for a reason: it deliberately doesn't try to enforce the invariants it depends on and leaves users to struggle with the consequences without providing any help. So, caution is needed when it is used.

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

PR: https://git.openjdk.org/jdk/pull/11861


More information about the hotspot-compiler-dev mailing list