[foreign-abi] RFR: 8239345: need an enum for standard C types and a way to get a memory layout for those C types

Anthony Vanelverdinghe github.com+15714253+anthonyvdotbe at openjdk.java.net
Wed Feb 19 19:51:12 UTC 2020


On Wed, 19 Feb 2020 17:47:51 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> SystemABI.Type enum added and ABI_CLASS attribute of layout removed (inferred from Type instead)

test/jdk/java/foreign/NativeTestHelper.java line 52:

> 51:         var optAbiType = layout.abiType();
> 52:         return optAbiType.isPresent()? optAbiType.get() == Type.POINTER : false;
> 53:     }

This can be written as:
`java
return layout.abiType().filter(Predicate.isEqual(Type.POINTER)).isPresent();
`

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

PR: https://git.openjdk.java.net/panama-foreign/pull/24


More information about the panama-dev mailing list