[LW2] Q-mirror, method handle, and reflection support for Q-type

Mandy Chung mandy.chung at oracle.com
Thu Nov 29 16:30:09 UTC 2018



On 11/29/18 6:07 AM, Tobias Hartmann wrote:
> On 29.11.18 10:00, Tobias Hartmann wrote:
>> Yes, I've seen that as well. I will have a look after you've pushed your fix.
> I've moved this test to TestNullableValueTypes because it currently requires the
> -XX:+NullableValueTypes switch. I've also refactored the test and it now passes with your fix:
> http://hg.openjdk.java.net/valhalla/valhalla/rev/9078486f6b80
>
> The -XX:-BytecodeVerificationRemote is not required anymore, you can remove it.
>

Thanks for refactoring the test.  With the following patch, the test passes.

diff --git 
a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNullableValueTypes.java 
b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNullableValueTypes.java
--- 
a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNullableValueTypes.java
+++ 
b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNullableValueTypes.java
@@ -460,7 +460,7 @@
      @Test
      @Warmup(10000) // Warmup to make sure 'test17_dontinline' is compiled
      public boolean test16(Object arg) throws Exception {
-        Method test16method = getClass().getMethod("test16_dontinline", 
MyValue1.class);
+        Method test16method = getClass().getMethod("test16_dontinline", 
MyValue1.class.asValueType());
          return (boolean)test16method.invoke(this, arg);
      }

Looking at the test18 and test19 test case, I think the lookup should 
have failed but succeeds.  I create a JBS issue to follow up:
    https://bugs.openjdk.java.net/browse/JDK-8214488

Mandy


More information about the valhalla-dev mailing list