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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 182A5BBC4 for ; Thu, 5 Mar 2009 17:26:19 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnICAHqLr0lA6ba9k2dsb2JhbACUQT8BAQEBCQkKCREDs1WBB5ADAQMBA4QFBoMI X-IronPort-AV: E=Sophos;i="4.38,307,1233529200"; d="scan'208";a="25128165" Received: from nf-out-0910.google.com ([64.233.182.189]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Mar 2009 17:26:18 +0100 Received: by nf-out-0910.google.com with SMTP id b21so2151nfd.7 for ; Thu, 05 Mar 2009 08:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=5QSPPtYLTAD+LuWajanJCuFsRQuwO/dJplB5WjiGPa0=; b=DuvJS7Yrx72qntzvVOcjjKocdy4+qOqyt9fl8M7Zo5ewSdIS+/YyAa+i2ysz+lwQKp 3q4p0lsXfoou0i7ZehEz+gmyEI48J000mgfCdE7EZUfhBc4rrPK9EJs3EVJyBGdCdcKc pDBMvMy9au4KH4RWaKqWYauNFnzVr5D6nvtjA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=XLXKtP3cpeASxsV9cbWx4veq4NAYH10UN0RBu0Voy3K/nayEHMUEpkgtqtk5qihMrk 3KKmrxvguf0fAOhfmdQ1LYlNDCbWpuNQckVy0vzR7oRQ/qdQc7GvbABZRycwhslhlLZM CxCjkqRHOlK+XGpJMh6z0VYCS7XLgu6TIJOKY= Received: by 10.216.8.78 with SMTP id 56mr842508weq.210.1236270375108; Thu, 05 Mar 2009 08:26:15 -0800 (PST) Received: from ?10.10.30.14? (171.Red-88-3-3.dynamicIP.rima-tde.net [88.3.3.171]) by mx.google.com with ESMTPS id 5sm228909eyh.11.2009.03.05.08.26.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Mar 2009 08:26:14 -0800 (PST) References: <19147175-3CFE-4AF5-9C8D-D286E5D2B058@gmail.com> Message-Id: <1310E4E3-2D82-4684-9339-25C1C7F61813@gmail.com> From: Joel Reymont To: Sylvain Le Gall In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [Caml-list] Re: ocaml ast to machine at runtime Date: Thu, 5 Mar 2009 16:26:11 +0000 Cc: caml-list@inria.fr X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; ocaml:01 runtime:01 ocaml:01 wrappers:01 runtime:01 invoke:01 wrote:01 caml-list:01 functions:01 ast:02 binding:02 library:03 library:03 overhead:04 overhead:04 On Mar 5, 2009, at 3:55 PM, Sylvain Le Gall wrote: > Why not using the LLVM OCaml binding? It is directly shipped with > LLVM. > So you can write the entire generator in OCaml... I would love to use LLVM. My concern is the overhead of calling from LLVM into OCaml, though. The code I'll be generating will need to make use of a library of functions. I'd prefer to stay in OCaml so this library will need to be wrapped in C, if my understanding is correct. This implies manual labor to code the wrappers and the runtime overhead to invoke them. Thanks, Joel --- http://tinyco.de Mac, C++, OCaml