On Mon, 30 Mar 2026 14:40:52 GMT, Chen Liang <[email protected]> wrote:
>> From my original PR: >>> Also I am not sure if it is the case that we always trust the internal >>> final values and do fold them, but I changed it to use `@stable` checks vs >>> a sentinel, which I know are trusted as final. However maybe this is >>> unnecessary, and some core library / compiler person has some input. > > @xmas92 It can. It is a static final field so its result is naturally > trusted, adding `@Stable` would actually untrust its `false` value. Check > `ciField.cpp`. Good to know. So `@Stable` is only useful for non final fields. Is the reason that the box caches `cache` fields are not final, (and `@Stable` instead)? Some AOT / CDS interaction? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2249#discussion_r3013710323
