From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5D5A9BC37 for ; Fri, 1 Jan 2010 17:45:38 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcBAB+1PUvRVdvikGdsb2JhbACRRYlIPwEBAQEJCQwHEwOqLIEyhDKGVQECAwWELAQ X-IronPort-AV: E=Sophos;i="4.47,486,1257116400"; d="scan'208";a="40589684" Received: from mail-ew0-f226.google.com ([209.85.219.226]) by mail2-smtp-roc.national.inria.fr with ESMTP; 01 Jan 2010 17:45:38 +0100 Received: by ewy26 with SMTP id 26so11168921ewy.3 for ; Fri, 01 Jan 2010 08:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=ME3s69aMphEd7Afqy2d0GdELtLHD+i1UrW/HR3XU2H0=; b=rPJXpgb2oJeh4vvdKvKXFJfGu8EeOKUVi6QyIHJVgCyP7bbn6OebtR+z63us0lWx5P O8ofCviLrGJFPa/m2KUy8sJENw7LXHxMeH+wZwbujV/AF7oV0OshgcGn1rY5nSRbCC3c 9dumoOhEeKhmWPYWILJTR7EbHBfp6NAwVi9eA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=vI0Z5eMm3qpDS1rV8scTuzNT014xJ0rN6VJihpknBpbi7EiJxtya3zXXvz7/kKpoKj qXezr+S6yGnszv7CP5FGMGyNMt86EfKelradeZuNqFQvaNhXacLguc2JO3DvcdtLOJ3u 6n5oDscN7sM/bMHzycd4Phnrtoey8QPf6037E= Received: by 10.213.2.81 with SMTP id 17mr10127789ebi.83.1262364337618; Fri, 01 Jan 2010 08:45:37 -0800 (PST) Received: from ?10.10.30.18? ([80.31.187.117]) by mx.google.com with ESMTPS id 16sm10832600ewy.6.2010.01.01.08.45.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 01 Jan 2010 08:45:36 -0800 (PST) From: Joel Reymont Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: ocaml, llvm and generating code at runtime Date: Fri, 1 Jan 2010 16:45:34 +0000 Message-Id: <405ED4B9-9B3C-4BAA-9C79-C18BB8FDDB4D@gmail.com> To: caml-list@yquem.inria.fr Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) X-Spam: no; 0.00; ocaml:01 runtime:01 ocaml:01 bindings:01 runtime:01 compiler:01 scalable:01 compile:01 functions:01 ast:02 compiling:02 binary:02 assembler:02 seems:03 concurrent:04 Does anybody have example code that shows how to generate OCaml bindings = at runtime with LLVM? My goal is to compile an AST into code that uses OCaml functions within = the same binary that's doing the compiling. I don't think it can be done with OCaml since it requires a standalone = assembler, linker, etc. Correct me if I'm wrong, though. Mine is a = web-based compiler with potentially many concurrent sessions. Running = gas, ld, etc. seems a much heavier and less scalable approach that = generating code at runtime. Thanks and Happy New Year, Joel --- http://wagerlabs.com