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

Chen Liang liach at openjdk.org
Tue Jul 8 14:19:54 UTC 2025


On Tue, 8 Jul 2025 02:58:42 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
>
> test/jdk/valhalla/valuetypes/ValueClassTest.java line 43:
> 
>> 41: class ValueClassTest {
>> 42:     @Test
>> 43:     void testIsValueObjectCompatible() {
> 
> Should this test be run both with and without --enable-preview?

Like replace all `assertTrue(` with `assertEquals(PreviewFeatures.isEnabled(), `? That sounds reasonable.

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

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


More information about the valhalla-dev mailing list