Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-06-25 (10:56)
From: Basile Starynkevitch [local] <basile.starynkevitch@i...>
Subject: Re: [Caml-list] Writing a JIT compiler
On Fri, Jun 25, 2004 at 10:53:14AM +0100, Jon Harrop wrote:
> On Friday 25 June 2004 09:52, Benjamin Geer wrote:
> > There's already a JIT compiler for OCaml code:
> >
> >
> So maybe I could get ocamljitrun to execute my interpreter and write my 
> interpreter to dynamically convert host code into OCaml bytecode which can 
> then be JIT compiled into native code and dynamically linked back in with the 

Ocamljitrun is a plugin replacement for ocamlrun (and libcamlrun.a,
renamed as libcamljitrun.a) - it executes Ocaml bytecode (by
translating them transparently into native code). It works with
dynamically linked ocaml modules and toplevels.

So your interpreter might generate Ocaml bytecode (perhaps reusing the
"lambda" representation of Ocamlc) - and ocamljitrun will, when
interpreting it, translate the bytecode to machine code.

Ocamljitrun requires latest Ocaml CVS or future Ocaml 3.08. (the
current 3.07 release won't work with it).

Feel free to ask me additional questions about it.

As I told in my previous posting, you might have a look into MetaOcaml
(see for more)

Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project - phone +33 1 3963 5197 - mobile 6 8501 2359 --- all opinions are only mine 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: