On Fri, Apr 13, 2018 at 10:59 AM, Nicolas Cellier <[hidden email]> wrote:
Sounds good. A fork is to be avoided at all costs. I don't see any pressure for a fork though because the plugin is essentially defined by the platform's ABI and Andreas' design for the type specification language is sufficiently general. Am I missing something? (Esteban are you reading?)
2018-04-13 21:28 GMT+02:00 Eliot Miranda <[hidden email]>:
With my current understanding, two essential features are missing in the type compiledSpec:
- multiple indirection pointers (I've got an example of these in HDF5)
- fixed size arrays in struct members (I've got an example in HDF5 too!)
For now, we can workaround with
- void * declaration and human crafted pointer handling
- unrolled array members (1 member per array slot!)
A modification of FFI would be necessary only for enforcing type checking.
I don't plan anything right now, and I agree that doing so with backward compatibility is by far preferred.
On Fri, Apr 13, 2018 at 12:40 PM, Nicolas Cellier <[hidden email]> wrote:
What do you mean, 64 vs 32 bit pointers or?
I think unrolling might be a good solution. There are relatively few types in a typical FFI interface and even fewer that have fixed size arrays in structs, so adding this would indeed create a few large specs, but in practice not many, whereas introducing support for arrays of types in the specs would add recursion into the marshaling in the plugin, and that could be error prone and slow. Unrolling in the type to spec compiler (and re-rolling in printTypedefOn:) is probably simpler and I suspect would be far more robust.
I'm not sure where this comes in if we unroll. At least on callout the plugin merely checks that a structure is of the right size, and if specified the right subclass of ExternalStructure. That's still sufficient if we realign instances of ExternalStructure on startup right?
|Free forum by Nabble||Edit this page|