rfr [lworld] add comments and fix test

Ioi Lam ioi.lam at oracle.com
Thu Jan 10 02:01:08 UTC 2019

Hi Harold,

The changes look good to me.

As a aside, I must admit that I won't be able to read or modify the jcod 
files. I know jasm doesn't support value types yet. How about this:

1. Write a test with valid Java code. Compile it with jtreg

value class Val {
   final int x = 0;

class Test {
   static void foo(Object[] o) {}
   static void bar(Val[] v) {

2. read the Test.class file into a byte array, replace all occurrences 
of [LVal; with [QVal;

3. load the byte array using a custom class loader.

With the CDS tests, we have a utility that does this kind of bytecode 


Alternatively, we can use ClassWriter as in the following test, but 
that's kind of messy, too.



- Ioi

On 1/9/19 12:22 PM, Harold David Seigel wrote:
> Hi,
> Please review this small change to add value-type array co-variance 
> comments to the verifier and to fix a broken test.
> Open Webrev: 
> http://cr.openjdk.java.net/~hseigel/lworld_verf_nocovar/webrev/index.html
> Thanks, Harold

More information about the valhalla-dev mailing list