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 BAA06281; Thu, 3 Jan 2002 01:40:15 +0100 (MET) 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 BAA06741 for ; Thu, 3 Jan 2002 01:40:14 +0100 (MET) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g030eD513181 for ; Thu, 3 Jan 2002 01:40:14 +0100 (MET) Received: from mel-rta7.wanadoo.fr (193.252.19.61) by mel-rto6.wanadoo.fr; 3 Jan 2002 01:40:13 +0100 Received: from warp (80.13.176.146) by mel-rta7.wanadoo.fr; 3 Jan 2002 01:40:07 +0100 Message-ID: <001f01c193ee$e07c8140$92b00d50@warp> From: "Warp" To: "Walter B. Rader" , References: Subject: Re: [Caml-list] Byte-code -> native code conversion? Date: Thu, 3 Jan 2002 01:37:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > In theory, is it possible to "convert" a Caml byte-code program into > a native executable (without the source code of that program being > available)? > > I'm wondering if it would be possible to distribute Caml programs in > byte-code format for portability, and the user may then choose to compile > the program to native code for speed. > > Is this possible? Difficult? Any thoughts? I think it won't be too much difficult to write a virtual machine which will convert on-the-flow ocaml bytecode into native asm code, and then call it. But seems like much efforts have been made in register assignation of the ocaml interpreter ( under GCC ) to make the interpreter running faster, so you can use bytecode compilation without a big speed loss. Anyway, ocaml bytecode "translated" to native asm won't be as much optimized as native can be. Warp ------------------- 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