[foreign-jextract] [Rev 01] RFR: 8241504: Expose MemoryLayout annotations/attributes in the public API (foreign-jextract part)

Jorn Vernee jvernee at openjdk.java.net
Thu Mar 26 16:31:28 UTC 2020


On Thu, 26 Mar 2020 16:25:31 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> test/jdk/java/foreign/NativeTestHelper.java line 41:
>> 
>>> 40:     public static boolean isIntegral(MemoryLayout layout) {
>>> 41:         return switch(SystemABI.Type.fromLayout(layout)) {
>>> 42:             case BOOL, UNSIGNED_CHAR, SIGNED_CHAR, CHAR, SHORT, UNSIGNED_SHORT,
>> 
>> Need to catch the exception?
>
> No, I don't think so. The intent is to have a hard failure if the ABI type is missing. The old code was failing more
> silently by returning `false`.

Similar motivation here: https://github.com/openjdk/panama-foreign/pull/64#discussion_r398488164

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

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


More information about the panama-dev mailing list