RFR: 8268389: [lworld] Tests must be update after core reflection changes for the L/Q model [v2]

Frederic Parain frederic.parain at oracle.com
Tue Jun 8 18:04:57 UTC 2021



> On Jun 8, 2021, at 1:15 PM, Mandy Chung <mchung at openjdk.java.net> wrote:
> 
> On Tue, 8 Jun 2021 14:33:51 GMT, Frederic Parain <fparain at openjdk.org> wrote:
> 
>>> test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java line 75:
>>> 
>>>> 73:         Asserts.assertTrue(test1(MyValue1.class, MyValue1.class), "test1_2 failed");
>>>> 74:         Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_3 failed");
>>>> 75:         Asserts.assertTrue(test1(MyValue1.class.asValueType(), MyValue1.class.asValueType()), "test1_4 failed");
>>> 
>>> should the first MyValue1.class.asValueType() in line 75 be MyValue1.class (to match MyValue1.ref.class) ?
>> 
>> MyValue1.class.asValueType() and MyValue1.class are different (secondary mirror vs primary mirror), so changing from MyValue1.class.asValueType() to MyValue1.class would make this line to fail.
>> However, this line has not been fixed properly (it accidentally duplicates line 74).
>> Now, I think the right way to fix it is:
>> 
>> Asserts.assertFalse(test1(MyValue1.class, MyValue.class.asValueType()), "test1_4 failed");
>> 
>> The test has to be inverted from assertTrue to assertFalse to verify that the two mirrors are distinct.
> 
> In fact `MyValue1.class` == `ldc QMyValue1;` and `MyValue1.class` and `MyValue1.class.asValueType()` are the secondary mirror. `MyValue1.ref.class` is the primary mirror.


Mandy,

Thank you for the clarification. Many of the changes are in fact incorrect(invalid changes from x.ref.class to x.class).
I was confused because getClass() always returns the primary mirror and .class returns either the primary or the secondary (I should have known that because I reviewed your code implementing this).
I’ll back out this changeset and re-do it correctly.

Fred


> 
> AFAIU, these tests fail in -Xcomp mode (pass in -Xint mode) as it's awaiting for the JIT phase 2 support (JDK-8267932) which is blocked by the core reflection support.
> 
> Would disabling -Xcomp run from these tests be a better temporay fix until JDK-8267932?
> 
> -------------
> 
> PR: https://git.openjdk.java.net/valhalla/pull/437



More information about the valhalla-dev mailing list