[foreign-memaccess] RFR 8224040: Misc improvements to layout API
Jorn Vernee
jbvernee at xs4all.nl
Thu May 16 14:38:40 UTC 2019
- Spelling nit : LayoutPath::elementPath(String) &
LayoutPath::elementPath(long) in the javadoc "a sub-elements" -> "a
sub-element".
- Some javadoc, particularly in Layout, LayoutPath, Compound, and
Sequence, still mentions 'bound'/'unbound' when talking about Sequences
with/without a fixed size. I believe this is incorrect and should be
'bounded'/'unbounded' instead, which as an adjective means 'having
bounds or limits' (or the inverse) [1].
- While you're doing misc cleanups, you could also do a defensive copy
of Group::struct and Group::union `elements` array. Otherwise the
resulting object will not be immutable if an existing array is passed
in, which is later modified.
Jorn
[1] : https://www.dictionary.com/browse/bounded
Maurizio Cimadamore schreef op 2019-05-16 15:43:
> Hi,
> this cleans up some of the edges of the API:
>
> * better spec for Layout::bitsSize (which can throw on unbound
> sequences, thx Jorn for pointing that out!)
> * replace LayoutPath::isBound with LayoutPath::dimensions, and fix
> javadoc
> * remove Ednianness enum, and just use old good nio ByteOrder
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/panama/8224040/
>
> Cheers
> Maurizio
More information about the panama-dev
mailing list