downcalls, fixed-sized ABI types

Michael Zucchi notzed at gmail.com
Mon Jan 20 04:01:49 UTC 2020


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