[foreign-jextract] RFR: 8266814: Improve library loading with SymbolLookup abstraction

Jorn Vernee jvernee at openjdk.java.net
Tue May 11 11:10:02 UTC 2021

On Tue, 11 May 2021 10:46:48 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This patch add jextract support for the newly added `SymbolLookup` abstraction.
> Note that the symbol lookup used by jextract classes is a *chained* lookup. That is, first the loader lookup is searched, and, when that fails, the system lookup is also searched.

LGTM. Small comment inline

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

> 149:         return (pkgName.isEmpty()? "" : "package " + pkgName + ";\n") +
> 150:                         String.join("\n", Files.readAllLines(Paths.get(runtimeHelper.toURI())))
> 151:                                 .replace("${C_LANG}", C_LANG_CONSTANTS_HOLDER);

I don't think this is actually doing anything? I don't see `${C_LANG}` being used in RuntimeHelper Not sure the accompanying change in ClassSourceBuilder is needed either.


Marked as reviewed by jvernee (Committer).

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

More information about the panama-dev mailing list