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 9EB82BBC4 for ; Thu, 5 Mar 2009 15:59:48 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsACAJ13r0nRVduukWdsb2JhbACUQT8BAQEBCQkMBw+yR4EHkBcBAwEDhAUGgwg X-IronPort-AV: E=Sophos;i="4.38,307,1233529200"; d="scan'208";a="25121988" Received: from mail-ew0-f174.google.com ([209.85.219.174]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Mar 2009 15:59:48 +0100 Received: by ewy22 with SMTP id 22so3107138ewy.27 for ; Thu, 05 Mar 2009 06:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=O8ePXvBjXjdxJj1/Hw0AIYEh92oRHiC7OuURoU23wNk=; b=kc4+OrgMWK7Hu+KipVnTDCfX2B/qmzH9fZGBoMmnmYlQQhzJEsJe59UZH8xzW/B3Ek E6/WW2hI6azkSdxK8WcAxzwEspfV6xXv+b6PGuDnL8ZBet0zG3/AwLt27iSwYBxRHQFk kzDRD8QXsIdU0iOvSMT/owcuXI3/exULKD1xA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=wAvGtdi5WBfh69+YVacQmknFoHHtyHJ7CVy/GlphtBNnbNI/ighpKaUdZHBVpl7KF5 znRxH3g30OeffXfTRD9K/Cc94sG6WYBa5pZa8R/dYda9KXhETdOUMk7x82iZCkGdkq93 xS5K6JYs/AsNADtyjWOB+bxHLobfb4x6exzBE= Received: by 10.216.50.69 with SMTP id y47mr774063web.91.1236265187704; Thu, 05 Mar 2009 06:59:47 -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 10sm85640eyd.33.2009.03.05.06.59.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Mar 2009 06:59:47 -0800 (PST) Message-Id: <19147175-3CFE-4AF5-9C8D-D286E5D2B058@gmail.com> From: Joel Reymont To: caml-list@yquem.inria.fr 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: ocaml ast to machine at runtime Date: Thu, 5 Mar 2009 14:59:44 +0000 X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; ocaml:01 runtime:01 ocaml:01 runtime:01 gcc:01 compile:01 parsing:01 functions:01 functions:01 ast:02 ast:02 programming:03 element:03 library:03 installed:05 I would like to compile trading systems written in a pascal-like programming language to OCaml AST at runtime, convert it to machine code and use it from the same running OCaml program (natdynlink?). Is it possible to do this without having gcc installed? The code I'm generating will need to be iterate over an array of doubles or be called from within the loop on every array element. It will also use a bunch of helper functions from my existing library. If I generate the code using LLVM then I'll need to write my helper functions in C and the only value I get from OCaml would be the parsing. If I write the helper functions in OCaml then I believe my loop will be slow as hell due to all the wrapping and unwrapping of OCaml values. Any suggestions? Thanks, Joel --- http://tinyco.de