RFR(M): 8206141: [lworld] Improve accessing a flattened value type array passed as Object[]

Roland Westrelin rwestrel at redhat.com
Thu Sep 27 09:35:19 UTC 2018


Here is a new webrev for this:

http://cr.openjdk.java.net/~roland/8206141/webrev.01/

that should address the comments from your review and some comments you
made offline.

The failure you reported happens because an array store is emitted with
a test for a flattened array and an ArrayCopyNode but after some
optimizations the type of the array becomes known and the code in
ArrayCopyNode::Ideal() sees a clone from an instance to an array which
is unexpected. I added a test case for that and fixed it by bailing out
of ArrayCopyNode::Ideal() when a mix of array and instance is seen.

I moved the check for a null value from array_store_check() to
array_store() as you mentioned offline that this would require less
runtime checks to be executed in some cases.

I also noticed that if we know the type of the value being stored and
that value cannot be a value type then we're guaranteed the store is to
a non value array. I changed the logic that emits the runtime check
accordingly.

Roland.


More information about the valhalla-dev mailing list