[foreign-jextract] RFR: 8252047: jextract generates uncompilable code with --source option [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Aug 20 12:23:22 UTC 2020


On Thu, 20 Aug 2020 04:18:07 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

>> Splitting constant helper class into multiple classes.
>> Piggybacking to avoid generating "long double" fields, variables, arguments.
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last
> revision:
>   Access LIBRARIES field without fully qualified name.

Minor comment on OutputFactory

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

> 240:
> 241:     private static boolean usesLongDouble(FunctionDescriptor desc) {
> 242:         if (!desc.returnLayout().isEmpty()) {

Eventually we'd like for logic like this to live in a separate filter visitor

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

> 394:         }
> 395:         if (layout.equals(CSupport.C_LONGDOUBLE)) {
> 396:             warn("skipping " + fieldName + " because of long double usage");

perhaps we could have a method which tests for equality with C_LONGDOUBLE and the same method is called both here and
from the useLongDouble function above?

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

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


More information about the panama-dev mailing list