[lworld] RFR: 8315935: [lworld] Apply flat renaming to C2 code

Tobias Hartmann thartmann at openjdk.org
Thu Sep 14 05:13:57 UTC 2023


On Tue, 12 Sep 2023 19:07:40 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> src/hotspot/share/oops/flatArrayOop.hpp line 32:
>> 
>>> 30: #include "runtime/handles.hpp"
>>> 31: 
>>> 32: // A flatArrayOop is an array containing flattened inline types (no indirection).
>> 
>> Shouldn't this be "flat inline types" instead?
>
> This is one aspect of the renaming that requires some bike-shading.
> So far, I've applied the "flat" qualifier to the container, the field or the array, because there's a direct impact on the shape of the container and the way it is accessed.
> But should we apply the "flat" qualifier to the value itself? The value is the value, a set of constants with a shape that doesn't change if it is stored in a flat field, a flat array or an standalone instance.
> Both "flat inline type" and "flattened inline type" sound weird to me, so I don't really have a preference. Does one make more sense or is more informative than the other?

I don't have a strong opinion but maybe we should simply rephrase this to:
`A flatArrayOop is a flat array containing inline types (no indirection).`

Or

`A flatArrayOop points to a flat array containing inline types (no indirection).`

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/925#discussion_r1325362330



More information about the valhalla-dev mailing list