[foreign-memaccess+abi] RFR: 8292174: Add unaligned layouts to ValueLayout [v3]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Aug 12 09:17:39 UTC 2022
On Thu, 11 Aug 2022 11:24:49 GMT, Per Minborg <duke at openjdk.org> wrote:
>> The layouts are placed in a special `Unaligned` class. This prevents the classes to be seen on the top level (for less cluttering) and allows lazy initialization of items that are likely not so much used.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix test and remove unaligned of size 8 bits
I think one of my comment got lost here. There are places where we define unaligned layouts in the implementation. Look at:
src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java (seem unused)
src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java (these are used)
test/jdk/java/foreign/TestMemoryDereference.java
test/micro/org/openjdk/bench/java/lang/foreign/JavaLayouts.java
For the last one, my suggestion is to drop the JavaLayouts class, and inline the use where needed.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/705
More information about the panama-dev
mailing list