JNI was <was> Re: RFR: 8183546: [MVT] cleanup/improve vreturn convention implementation

Paul Sandoz paul.sandoz at oracle.com
Fri Jul 7 00:23:45 UTC 2017

I got a basic test working, see updated in place webrevs.

There were T_VALUETYPE cases missing in the code for generating native entries and wrappers, not sure i got all of ‘em, and if the approach in general is fully correct.

The Unsafe native method returns a jobject requiring that the value oop is allocated on the heap. That might be ok since i expect any C1/C2 intrinsic will optimize. However, for JNI in general perhaps there needs to be some refinement and i am guessing some aspects of JNI will anyway require an overhaul at some point.


> On 6 Jul 2017, at 07:58, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
> Slight change in behaviour with the patch applied. Now i observe null returned if ValueTypeReturnedAsFields is enabled or disabled. (Note this behaviour is observed when running with -Xint).
> This is currently what i am using:
>  http://cr.openjdk.java.net/~psandoz/valhalla/unsafe-value-jdk/webrev/ <http://cr.openjdk.java.net/~psandoz/valhalla/unsafe-value-jdk/webrev/>
>  http://cr.openjdk.java.net/~psandoz/valhalla/unsafe-value-hotspot/webrev/ <http://cr.openjdk.java.net/~psandoz/valhalla/unsafe-value-hotspot/webrev/>
> Paul.

More information about the valhalla-dev mailing list