Collapsing the requirements
John Rose
john.r.rose at oracle.com
Tue Aug 6 21:09:50 UTC 2019
On Aug 6, 2019, at 1:50 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>
>
> I believe 'Q' should be only mean preload and the fact that the class has a inline bit should imply flattenable and non-nullable.
> Yes, we consume one of these precious bit but at the same time, we nicely decouple the meaning of the descriptor from the meaning of the class itself.
+1; JVM folks who were at the Burlington meeting earlier this year heard me saying “Q means ‘go and look’” ad nauseam.
In other words, since Q means “preload” to start with, every other implication of Q’s meaning can be obtained by looking inside the classfile of the referenced class.
This commits us to Q entailing only def-site properties, and not carrying additional use-site information. I’d like to use a separate “type operator” syntax, a la QPoint//anno; LString//anno; to carry per-use-site information not derived from the class definition. (What’s “anno”? TBD, and open for continual extension like any annotation mechanism. Could be “n” for “not null” for starters if we need that. Could expand to cover species information.)
As for burning a bit in the class file header, that’s doable, but we might also consider deriving the necessary schema information from the supers of the inline class, if we can hardwire the supers just right. For example, if a class declares ValObject as its super, and ValObject is hardwired as the mother of all inlines, then who needs an extra bit to confirm that the class is an inline? Put the extra bit into an internal JVM field on the metadata, but don’t burn an access_flags bit for that.
More information about the valhalla-spec-observers
mailing list