[lworld] RFR: 8361496: [lworld] Treating interfaces as isValue() leads to failed assert

Chen Liang liach at openjdk.org
Tue Jul 8 03:14:53 UTC 2025


On Tue, 8 Jul 2025 02:52:38 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Reviewed a few sites of isValue() usages that cause immediate trouble with bootstrap and basic tests. Factor out `ValueClass::isValueObjectCompatible` and `isValueObjectInstance` to represent the two states of value classes: field types that can hold value objects, and field types that definitely hold value objects.
>> 
>> I think we still need a more throughout review for all `isValue` usages, such as those in MethodHandle or VarHandle. Preliminary testing hasn't revealed anything yet.
>> 
>> Testing: tier 1-3, seems to have no new failures
>
> src/java.base/share/classes/java/lang/Class.java line 643:
> 
>> 641:             return false;
>> 642:         }
>> 643:         return !isIdentity();
> 
> Copy the lines from PR#1499.
> Nothing is value unless preview is enabled.
> 
> Suggestion:
> 
>         return PreviewFeatures.isEnabled() ? !isIdentity() : false;

This preview switch is retained right above the first deletion in this small piece of diff.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1504#discussion_r2191386889


More information about the valhalla-dev mailing list