From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA10694; Fri, 25 Jun 2004 12:56:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA10730 for ; Fri, 25 Jun 2004 12:56:53 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5PAuqEV002967 for ; Fri, 25 Jun 2004 12:56:53 +0200 Received: from bourg.inria.fr (bourg.inria.fr [128.93.11.100]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA10625 for ; Fri, 25 Jun 2004 12:56:52 +0200 (MET DST) Received: from basile by bourg.inria.fr with local (Exim 4.34) id 1BdoNa-0000iC-I1 for caml-list@inria.fr; Fri, 25 Jun 2004 12:56:22 +0200 Date: Fri, 25 Jun 2004 12:56:22 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] Writing a JIT compiler Message-ID: <20040625105622.GA2707@bourg.inria.fr> References: <200406250904.09178.postmaster@jdh30.plus.com> <40DBE7D8.8020209@misys.com> <200406251053.14819.postmaster@jdh30.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <200406251053.14819.postmaster@jdh30.plus.com> User-Agent: Mutt/1.5.6+20040523i From: "Basile Starynkevitch [local]" X-Miltered: at nez-perce with ID 40DC04F4.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 basile:01 basile:01 2004:99 2004:99 dynamically:01 dynamically:01 ocamlrun:01 libcamlrun:01 toplevels:01 reusing:01 ocamlc:01 3.07:01 metaocaml:01 metaocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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: > > > > http://cristal.inria.fr/~starynke/ocamljit.html > > 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 http://metaocaml.org/ for more) Regards. -- Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359 http://cristal.inria.fr/~starynke --- all opinions are only mine ------------------- 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