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 TAA27774; Fri, 25 Jun 2004 19:04:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA27757 for ; Fri, 25 Jun 2004 19:03:59 +0200 (MET DST) Received: from mail3.bluewin.ch (mail3.bluewin.ch [195.186.1.75]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5PH3xSH027575 for ; Fri, 25 Jun 2004 19:03:59 +0200 Received: from [10.0.1.2] (62.203.136.49) by mail3.bluewin.ch (Bluewin AG 7.0.028) id 40D19BF9001343FB for caml-list@inria.fr; Fri, 25 Jun 2004 17:03:58 +0000 Mime-Version: 1.0 (Apple Message framework v618) In-Reply-To: <20040625155517.GA4087@bourg.inria.fr> References: <200406250904.09178.postmaster@jdh30.plus.com> <20040625095936.GA2041@bourg.inria.fr> <200406251325.15940.postmaster@jdh30.plus.com> <20040625155517.GA4087@bourg.inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: Re: [Caml-list] Writing a JIT compiler Date: Fri, 25 Jun 2004 19:05:30 +0200 To: caml-list@inria.fr X-Mailer: Apple Mail (2.618) X-Miltered: at concorde with ID 40DC5AFF.000 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 callback:01 forking:01 gcc:01 dlopen:01 dlsym:01 dlclose:01 dynlink:01 raffalli:01 glsurf:01 lgpl'd:01 lama:01 univ-savoie:01 raffalli:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Le 25 juin 04, =E0 17:55, Basile Starynkevitch [local] a =E9crit : > 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=20 his program GlSurf. You may want to have a look to his (LGPL'd) code=20 [1]. Daniel [1] ------------------- 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