Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: Caml Mailing List <caml-list@yquem.inria.fr>
Cc: LLVM Developers Mailing List <llvmdev@cs.uiuc.edu>
Subject: Ocaml(opt) & llvm
Date: Mon, 26 Nov 2007 19:27:19 +0100	[thread overview]
Message-ID: <474B1007.5050600@starynkevitch.net> (raw)

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: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


             reply	other threads:[~2007-11-26 18:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26 18:27 Basile STARYNKEVITCH [this message]
2007-11-26 19:31 ` [Caml-list] " Gordon Henriksen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=474B1007.5050600@starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=llvmdev@cs.uiuc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox