downcalls, fixed-sized ABI types
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Jan 20 11:11:55 UTC 2020
There needs to be a discussion on what kind of layout constants should
be provided.
In the old repo we had a combination which, I think, worked well - there
were _both_ ABI-specific constants (say - if you wanted to specifically
target a platform, these are good targets for jextract). But there were
also platform-agnostic constants like C_INT, which were dynamically
bound to the right ABI-dependent constant. I think having these would be
helpful, plus the addition of some more, like SIZE_T etc.
So, yes, work in progress.
Maurizio
On 20/01/2020 04:01, Michael Zucchi wrote:
>
> Hi guys,
>
> I suspect this is still somewhat 'work in progress', but when creating
> downcall method handles you need to use the annotated ValueLayouts in
> the FunctionDescriptor but these only contain the arbitrary 'c' sizes
> from the standard platform compiler.
>
> But this misses some important types like size_t, intptr_t, or the
> stdint types. So to map to those you need to know both the size the
> type and the size of the integral types you're mapping to, and not
> just it's symbolic base name. It would be convenient if the sized
> types worked or were available since that is the most fundamental
> information you get from the c compiler.
>
> If you know all this information already, the ABI stuff just seems
> redundant. And the way the abi definitions are accessed also seems
> counter to creating dynamic cross-platform code, at least without a
> bunch of extra scaffolding.
>
> Thanks,
> Michael
>
More information about the panama-dev
mailing list