Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Writing a JIT compiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Writing a JIT compiler

Le 25 juin 04, à 17:55, Basile Starynkevitch [local] a écrit :

> I suggested him to generate C code (calling the
> appropriate OCaml caml_callback* when needed to apply functions) and
> then compile it (by forking a gcc command) as a shared library, and
> then dlopen it and using dlsym to get the function pointer and at last
> call it. You'll have to dlclose the library after using it. In
> principle, it is like using the Dynlink module, but ugly details
> differ.

If I remember well, Christophe Raffalli adopts a similar technique in 
his program GlSurf. You may want to have a look to his (LGPL'd) code 
[1].

Daniel

[1] <http://www.lama.univ-savoie.fr/~raffalli/glsurf>

-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners