RFR(M): arraycopy/clone/copyOf intrinsics fixes for Lworld
Tobias Hartmann
tobias.hartmann at oracle.com
Mon Jun 4 15:03:41 UTC 2018
Hi Roland,
On 04.06.2018 16:56, Roland Westrelin wrote:
> If the allocation is:
>
> new I[];
>
> for some interface I then we know we're not allocating a value type
> array that needs special initialization.
>
> If the allocation is through reflection for some Class c then the type
> system will report Object as array element. In that case, the array
> could be a value type array. But for
>
> new Object[];
>
> the element type is also Object but it doesn't need special
> initialization. So my patch should actually test whether the element
> type is exact or not.
>
> New webrev:
>
> http://cr.openjdk.java.net/~roland/valhalla/arraycopy-lworld/webrev.02/
Got it. The new webrev looks good to me!
> Wrt, to the load of elem_klass that's not needed. That will be optimize
> away, right? I would rather keep the logic simple.
Yes, sure.
Thanks,
Tobias
More information about the valhalla-dev
mailing list