RFR 8223345 [lworld] Implement ValueTypeReturnedAsFields for C1

Ioi Lam ioi.lam at oracle.com
Sat May 4 00:13:10 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8223345
http://cr.openjdk.java.net/~iklam/valhalla/8223345-c1_return_vt_as_fields.v01/

The implementation is pretty straight-forward as most of the work of 
packing/unpacking is done inside runtime functions, the same as the 
interpreter.

I refactored MacroAssembler::store_value_type_fields_to_buf so that it 
can be reused between the interpreter and C1.

One problem with the current way of using the runtime functions is that 
it's neither fast, nor small :-(

+ For better performance, it might be better to do the packing/unpacking 
in-line.
   I'll leave that for future optimization.

+ On the other hand, if we want smaller code, I think the 
inline-allocation code can
   be moved into ValueKlass::pack_handler(). I might do that as a 
separate RFE.

I've added FIXME comments in the code for the above.

Thanks
- Ioi


More information about the valhalla-dev mailing list