[vector] require primitive classes not not boxed classes

Paul Sandoz paul.sandoz at oracle.com
Thu Mar 29 01:23:17 UTC 2018


Hi,

It always bothered me that Vector.elementType returned the boxed class instead of the primitive class, and methods such as speciesInstance/preferredSpeciesInstance only accepted the boxed class. This patch changes that. It also aligns with the element type argument required for intrinsics.

I noticed that the rebracket operations were being passed the result of elementType() i.e. the boxed class. This may imply the operation was never intrinsified? [*]. I changed it to pass in the primitive class.

  http://cr.openjdk.java.net/~psandoz/panama/box-to-prim-class/webrev/

This is quite a disruptive change, code will need updating when obtaining a species.

Paul.

[*] This is also a general reminder that at some point testing should verify intrinsification on supported platforms. The WhiteBox API should be able to help us (or we could modify it to help us), which is better than running with PrintInlining/PrintCompilation and greping the output.


More information about the panama-dev mailing list