On Fri, 2005-01-28 at 14:53 +0100, Michael Weber wrote:
> Does BitC have a Foreign Language Interface?
>
> Basically, what's needed for this is a mapping of BitC types/values to
> types/values of language L, and a specification of call mechanism(s).
Not at this time. At present, the only plans we have for this are a
mechanism within the language to declare that a procedure is non-
emitted:
(define sqrt (x: float)
(declare (suppressed))
... algorithm for square root ... )
The obligation to ensure that the implementation matches the properties
of the placeholder implementation lies with the programmer.
The issue here is a good bit trickier than it looks. We clearly need to
have pieces of code (assembly stubs, runtime, etc.) that cannot be
implemented within BitC, and at some point we are going to need to
interface to existing I/O subsystems and the like. How to go about this
without losing all hope of verification is a serious challenge.
Getting a match-up on types is actually quite easy. It requires that the
representation of types be specified by the language (which it will be),
and that the platform-specific calling convention must also be mated
well to the native calling convention. Certainly for C I wouldn't
anticipate any real challenge here.
shap
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev