[foreign-memaccess] RFR 8228487: Find a better name for MemoryLayout::ofValue
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Jul 22 17:53:04 UTC 2019
Hi,
this is a simple (but probably controversial) patch. I realized that
when we consolidated all the factories for ValueLayout we were left with
a very general-sounding:
MemoryLayout.ofValue(32, ....)
This kind of gives the feeling that 32 is the _value_, not the size in bits.
This patch changes that to 'ofValueBits' and does a similar change
ofPadding -> ofPaddingBits
(leaving the door open to ofValueBytes and ofPaddingBytes).
I've also considered MemoryLayout.ofBits as an alternative, but found it
too vague (after all, even padding is "bits").
I think I like ofValueBits/ofPaddingBits, but these factory names are
now slightly inconsistent with the constant names in MemoryLayouts - can
we live with that? Or do we need better constant names too?
Webrev:
http://cr.openjdk.java.net/~mcimadamore/panama/8228487/
Maurizio
More information about the panama-dev
mailing list