To provide a path towards earlier community involvement and feedback from early adopters, the Valhalla Value Types project is working on an experimental initial implementation step. The intent is to explore a subset of JVM changes that would be required to support Value Types, without exposing them through the Java language compiler. Through a clever use of MethodHandles and byte code generation, we can give an early taste of some of the capabilities of Value Types. This talk will focus on the subset of Value Types provided in the Minimal Value Types, models of usage,some of the design trade-offs we are making to provide a coherent subset and touch on some of the open issues.
Minimal Value Types is an early access preview of value types being explored in the Value Types Valhalla project. It has been built on top of early results from the project. This talk will review several of the key changes made to JVMs to support value types, covering the representation of value types in the JVM model (stack slot, experimental bytecodes, signatures). Possible strategies to implement and optimize value type handling will be presented, covering also data layout with the opportunity value types offer to be flattened in arrays or fields, and the consequence of this flattening on type dependencies and class loading/resolution. This talk will also present the new JIT optimizations put in place for value types, the modification the bytecode verification needs with the introduction of value types into the Java type system, and some early performance results