[lworld] RFR: 8247357: Flattenable field concept needs some cleanup

John Rose john.r.rose at oracle.com
Wed Jun 10 19:30:07 UTC 2020


On Jun 10, 2020, at 11:55 AM, Frederic Parain <fparain at openjdk.java.net> wrote:
> 
> Please review these changes cleaning up the flattenable field concept.
> The concept has evolved with time and now all fields with an inline type are by definition flattenable, so the need to
> have a "flattenable bit" on the side is gone. The changeset contains a mix of renaming and code cleaning. The changes
> don't include JIT code, which would be fix in a follow-up patch.

I’m glad to see occurrences of “value” go away in favor of “inline”.

(The language gurus won’t absolutely promise that “inline” is the
final word on terminology, but I think at least for the JVM code,
“inline” is a far more descriptive term than “value”.)

The “is_flattenable” bit was often accompanied by an “is_flattened”
bit which reported whether the intended flattening actually took place.
Having their names be similar helped make the code understandable.
So I suggest renaming those guys also, since you are touching all
that code now.

The term “is_inline” is ambiguous when reading the code.  Where there
is any doubt about whether it means “is intended to be inlined” vs.
“is actually inlined in the layout”, the term should be made more explicit.

So I suggest:

s/is_flattenable/is_declared_inline/
s/is_flattened/is_allocated_inline/

Maybe that’s overkill?  But I think just “is_inline” is not clear enough.

— John


More information about the valhalla-dev mailing list