On Mon, 30 Mar 2026 14:14:56 GMT, Paul Hübner <[email protected]> wrote:

>> src/java.base/share/classes/java/lang/Byte.java line 182:
>> 
>>> 180:         if (ByteCache.isEnabled()) {
>>> 181:             final int offset = 128;
>>> 182:             return ByteCache.cache[(int)b + offset];
>> 
>> I think the introduction of `XxxCache.isEnabled` and all the changes to 
>> `valueOf` methods are redundant.
>
> 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.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2249#discussion_r3010174367

Reply via email to