Regarding the latest JEP 401 update

Brian Goetz brian.goetz at oracle.com
Wed Sep 27 18:08:30 UTC 2023



> 1. Why are method descriptor's types preloaded? They are not part of 
> the object layout.

Like layout, method calling convention is set early, and we can 
scalarize value objects in calling convention.

> 3. More value classes aside from Optional can be migrated: 
> OptionalInt, OptionalDouble, OptionalLong.

I think any value-based class in the JDK is a candidate.  Other possible 
candidates include dynamically generated classes such as lambda 
proxies.  There are also probably some candidates that are not marked as 
value-based.  Recent developments allow us to eliminate one of the 
restrictions of value-based classes (no accessible constructors).



More information about the valhalla-dev mailing list