[foreign-jextract] RFR: 8257892: long double not handled by jextract [v5]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Dec 9 17:06:45 UTC 2020


On Wed, 9 Dec 2020 16:57:08 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

>> added UnsupportedLayouts and checking/warning all unsupported types uniformly
>
> Athijegannathan Sundararajan has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - function pointers that use unsupported types should be filtered & warned as well.
>  - inlined OutputFactory.warnUnsupported in visitFunction for clarity.

Just minor stylistic change suggested to improve mainteinability of the code

src/jdk.incubator.jextract/share/classes/jdk/internal/jextract/impl/OutputFactory.java line 248:

> 246: 
> 247:     private static MemoryLayout isUnsupported(FunctionDescriptor desc) {
> 248:         if (isUnsupported(desc.returnLayout().orElse(null))) {

This subtly relies on the fact that isUnsupported layouts(null) does the right thing... not sure if that's too clever. Maybe just check if there's a return type, and if so check it?

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

Marked as reviewed by mcimadamore (Committer).

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


More information about the panama-dev mailing list