[lworld] RFR: 8244231: [lworld] Add support for ref-default and val-default inline classes.

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Jul 22 11:54:00 UTC 2021

On Thu, 22 Jul 2021 11:37:40 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

> Let me punt the question by saying - with the admission that javadoc of L_Typeof_Q was wrong and confusing, do we agree that once that is corrected, the flavors capture and model the domain information faithfully ? I don't off the top of the head recall places where this sharper distinction is needed - but if there is consensus that the model is valid even if a bit baroque, then that is reason to preserve it till we have more experience to definitively prune what we think is valid but superfluous information captured in the abstraction.

While the javadoc is the main issue, the current behavior or "isReferenceProjection" and "isValueProjection" remind me of `2 + 0 + 0 != 2`, so I find it confusing.

I think perhaps the name "projection" is also misleading - as now we have primitive reference type and primitive value type, and what you really want to ask a type is in which of these two bucket it falls in. Giving too much importance as to "how" a type has been derived (e.g. redundant `.val` or `.ref` ?) smells of over-specificity which will bite us back, I believe.


PR: https://git.openjdk.java.net/valhalla/pull/482

More information about the valhalla-dev mailing list