Sven Panne <Sven_Panne@BetaResearch.de> wrote,
Fergus Henderson wrote:
The calling convention should not necessarily default to 'ccall'. That would not be appropriate for all implementations.
Granted.
Instead, I think the default calling convention should be implementation-dependent.
Hmmm, this would make the semantics of the sources compiler-/interpreter- dependent, which is never a good thing.
That's what I think, too. In addition, I can't see that it would buy us anything.
So let's simply make callconv mandatory, "ccall" isn't that long after all.
If this is generally preferred, ok. (I won't change it, though, unless I hear more people asking for it.)
Also, implementations should be allowed to provide calling conventions not on that list.
IIRC the intention for enumerating some calling conventions here is to make future implementations agree on the name of callconv when they implement e.g. a C++ or Java FFI, not to rule out other possibilities.
Exactly.
But this should be made clear from the FFI spec.
The spec said, Generally, the set of calling conventions is open, as it is infeasible to cover all useful calling conventions in this report. I have changed this now to Generally, the set of calling conventions is open, i.e., individual implementations may elect to support additional calling conventions. Alternative wordings are welcome. Manuel