[foreign] RFR 8216484: jextract LayoutUtils has to be modified for Windows
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Mon Jan 14 06:31:35 UTC 2019
jextract supports ToolProvider interface. It is possible to create
multiple instances of jextract in the same process. LayoutUtils has a
static cache which is initialized using sizes obtained from clang
library. In theory it is possible that we may get different sizes for
types depending on preprocessor settings, 32/64 bit app etc. I think it
is better if we associate this cache with the current Context instance.
-Sundar
On 12/01/19, 6:58 PM, Jorn Vernee wrote:
> Hi,
>
> Continuing from [1, 2]
>
> I have polished the previous patch a little.
>
> Instead of doing the minimum needed for Windows support I've replaced
> all the LayoutUtils.Types constants, and instead am querying the type
> size from libclang and then caching the result, since libclang seems
> to know the right size to use for the platform.
>
> I have been looking at the libclang API and there doesn't seem to be a
> way to specify the target platform. I think it always uses the ABI of
> the platform it was built for.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8216484
> Updated Webrev:
> http://cr.openjdk.java.net/~jvernee/panama/webrevs/windows_jextract/webrev.01/
>
> Cheers,
> Jorn
>
> [1] :
> https://mail.openjdk.java.net/pipermail/panama-dev/2019-January/003680.html
> [2] :
> https://mail.openjdk.java.net/pipermail/panama-dev/2019-January/003683.html
More information about the panama-dev
mailing list