From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id DB9F7BC6B for ; Mon, 26 Nov 2007 19:27:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIeeSkc+BBBlnmdsb2JhbACBW41mAQEBAQcEBhEY X-IronPort-AV: E=Sophos;i="4.23,215,1194217200"; d="scan'208";a="4626722" Received: from smtp-101-monday.nerim.net (HELO kraid.nerim.net) ([62.4.16.101]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 Nov 2007 19:27:27 +0100 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by kraid.nerim.net (Postfix) with ESMTP id 8B416CF135; Mon, 26 Nov 2007 19:27:26 +0100 (CET) Received: from [192.168.0.1] (glinka.lesours [192.168.0.1]) by hector.lesours (Postfix) with ESMTP id 79B1520F1E5; Mon, 26 Nov 2007 19:25:26 +0100 (CET) Message-ID: <474B1007.5050600@starynkevitch.net> Date: Mon, 26 Nov 2007 19:27:19 +0100 From: Basile STARYNKEVITCH User-Agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071008) MIME-Version: 1.0 To: Caml Mailing List Cc: LLVM Developers Mailing List Subject: Ocaml(opt) & llvm Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; basile:01 basile:01 ocaml:01 ocaml:01 compiler:01 compiler:01 ocamlopt:01 ocamlopt:01 afaik:01 descriptors:01 hashtables:01 damien:01 metaocaml:01 dlopen:01 faiencerie:01 Hello All (to Ocaml List & CC LLVM list) As some might probably know, the LLVM compiler http://llvm.org/ has (at least in its latest SVN snapshot) a binding for Ocaml. This means that one could code in Ocaml some stuff (eg a JIT-ing compiler) which uses (and links with) LLVM libraries. http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-November/011481.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-November/011507.html However, to generate code with LLVM for Ocamlopt, this is not enough, since while LLVM does have hooks to support garbage collection http://www.llvm.org/docs/GarbageCollection.html I don't know of any actual hooks to fit into the needs of Ocamlopt garbage colector (which AFAIK require some specific frame descriptors in the code, in some hashtables, which details are tricky and known to very few implementors, perhaps only Xavier Leroy & Damien Doligez). So is there any code to fit the Ocaml GC requirements into LLVM abilities, ie to use LLVM to generate (eg JIT) code which respect Ocaml GC requirements. Of course, I do know that there are some typing issues and theoritical points which I deliberately ignore here. I'm supposing the guy wanting to LLVM for Ocaml is knowing that he seeks trouble. And Metaocaml is (unfortunately) nearly dead: future (in ocaml 3.11 or 3.12) dynamic libraries ability is not a full replacement! Even if one might generate Ocaml code and compile & dlopen it in a future version of Ocaml. Thanks for reading. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***