Moving from VVT to the L-world value types (LWVT) (original) (raw)

Frederic Parain frederic.parain at oracle.com
Tue Jan 16 20:56:11 UTC 2018


Here’s an attempt to bootstrap the L-world exploration, where java.lang.Object is the top type of all value classes (as discussed during the November meetings in Burlington).

This proposal tries to evolve the JVMS with a small set of changes to have an implementable specification of the L-world. Instead of trying to add Q/R/U-types to the JVMS, the approach is to expend the JVMS notion of “reference” to cover both regular classes and value classes. The notion of “class” has also be extended to cover both, but when needed, it is possible to specify an “object class” or a “value class”, or respectively, “an instance of an object class” vs “an instance of a value class”. The “Q…;” format is still used for value class types, but the “;Q” trick is gone.

The attach document contains sections of the JVMS that have been modified to implement the L-world. The text doesn’t have change bars, so people are encouraged to read each modified section entirely to see if it is consistent to cover all cases of the L-world.

Here’s a quick summary of the changes with some consequences on the HotSpot code:

One important point of this exercise is to ensure that the migration of Value Based Classes into Value Classes is possible, and doable with a reasonable complexity and costs. In addition to the JVMS update (and consistent with the JVMS modifications), here’s a set of proposals on how to deal with the VBC migration.

Migration of Value Based Classes into Value Classes:

In addition to the JVMS update, here’s a chart trying to summarize the new checks that will have to be added to existing bytecode when moving the vbytecodes semantic in to a* bytecodes. The categories in the chart are not very precise, but we can use it as a starting point for our discussions. The chart can also help defining which experiments could be done to estimate the costs of the different additional checks needed to be added to existing bytecodes.

All these are preliminary works for a proposal to implement the L-world value types and not a definitive specification. This has to be analyzed and discussed before any attempt to implement it starts. Feel free to send feedback, comments, other proposals, etc.

Thank you,

Fred -------------- next part --------------



More information about the valhalla-dev mailing list