* [Caml-list] Natively compiled code and toplevel
@ 2001-06-13 14:34 wester
2001-06-14 2:06 ` Jacques Garrigue
0 siblings, 1 reply; 4+ messages in thread
From: wester @ 2001-06-13 14:34 UTC (permalink / raw)
To: caml-list
Hi,
I looked over the mktoplevel manual and as far as I understand it is
possible to link compiled C-code with the mktoplevel but not to link
with natively compiled OCaml code. Am I right and why is this the case?
Rolf
-------------------------------------
Rolf Wester
wester@ilt.fhg.de
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Natively compiled code and toplevel
2001-06-13 14:34 [Caml-list] Natively compiled code and toplevel wester
@ 2001-06-14 2:06 ` Jacques Garrigue
2001-06-14 13:53 ` Fabrice Le Fessant
0 siblings, 1 reply; 4+ messages in thread
From: Jacques Garrigue @ 2001-06-14 2:06 UTC (permalink / raw)
To: wester; +Cc: caml-list
> I looked over the mktoplevel manual and as far as I understand it is
> possible to link compiled C-code with the mktoplevel but not to link
> with natively compiled OCaml code. Am I right and why is this the case?
>
> Rolf
You're right. To be efficient, native ocaml code does not use the same
conventions as C, so you cannot call a natively compiled ocaml function
as though it were a C function.
Fabrice Le Fessant has done some work on the other way round. See
asmdynlink on this page: http://pauillac.inria.fr/~lefessan/src/.
The idea is to be able to execute ocaml bytecode inside a native
program. With a large amount of hacking, it should be possible to
build an ocaml.opt, which in turn would allow you to link the toplevel
with native code...
I'm not sure it is worth the pain.
Cheers,
Jacques Garrigue
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Natively compiled code and toplevel
2001-06-14 2:06 ` Jacques Garrigue
@ 2001-06-14 13:53 ` Fabrice Le Fessant
0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Le Fessant @ 2001-06-14 13:53 UTC (permalink / raw)
To: Jacques Garrigue; +Cc: wester, caml-list
asmdynlink is included in the CDK (the version of ~lefessan/src is not
supported anymore), and allows to link any Ocaml bytecode module
OR EVALUATE ANY OCAML SOURCE from a native-code program. Of course, it
also works for bytecode programs, using the standard interpreter. For
native-code programs, bytecode interpretation is slower than when
executed by the standard interpreter. However, available native-code
functions are always used.
- Fabrice
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Natively compiled code and toplevel
@ 2001-06-14 2:13 David Gurr
0 siblings, 0 replies; 4+ messages in thread
From: David Gurr @ 2001-06-14 2:13 UTC (permalink / raw)
To: wester, garrigue; +Cc: caml-list
> From owner-caml-list@pauillac.inria.fr Wed Jun 13 19:09:47 2001
> From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
> To: wester@ilt.fhg.de
> Cc: caml-list@inria.fr
> X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f
> Subject: Re: [Caml-list] Natively compiled code and toplevel
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Thu, 14 Jun 2001 11:06:45 +0900
> X-Dispatcher: imput version 20000228(IM140)
>
> > I looked over the mktoplevel manual and as far as I understand it is
> > possible to link compiled C-code with the mktoplevel but not to link
> > with natively compiled OCaml code. Am I right and why is this the case?
> >
> > Rolf
>
> You're right. To be efficient, native ocaml code does not use the same
> conventions as C, so you cannot call a natively compiled ocaml function
> as though it were a C function.
>
> Fabrice Le Fessant has done some work on the other way round. See
> asmdynlink on this page: http://pauillac.inria.fr/~lefessan/src/.
> The idea is to be able to execute ocaml bytecode inside a native
> program. With a large amount of hacking, it should be possible to
> build an ocaml.opt, which in turn would allow you to link the toplevel
> with native code...
> I'm not sure it is worth the pain.
FWIW, Jocaml allows this and Jocaml is an extension of Ocaml.
>
> Cheers,
>
> Jacques Garrigue
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
>
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-06-14 7:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-13 14:34 [Caml-list] Natively compiled code and toplevel wester
2001-06-14 2:06 ` Jacques Garrigue
2001-06-14 13:53 ` Fabrice Le Fessant
2001-06-14 2:13 David Gurr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox