On Mon, 30 Mar 2026 14:26:03 GMT, Chen Liang <[email protected]> wrote:
>> Thanks for the input. Axel raised a point regarding this in >> https://github.com/openjdk/valhalla/pull/2249#discussion_r3009784200 > > I don't see how that comment relates to my suggestion. Axel says > `PreviewFeatures.isEnabled` can already reliably constant fold, so there is > no cost restoring the old calls. I agree if someone can confirm that the static final field `jdk.internal.misc.PreviewFeatures.ENABLED` is constant folded. My guess is that it should be because we have had a lot of JEPs restricting access to our internals, and there is JEP-500, however I do not know the details. The only reason this was in my original patch is because I know that `@stable` with an `@stable` sentinel check will be constant folded (unless changing the diagnostic flag `FoldStableValues`) . ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2249#discussion_r3010180488
