caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benedikt Meurer <benedikt.meurer@googlemail.com>
To: "Török Edwin" <edwintorok@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Why NOT to compile OCaml via C
Date: Fri, 9 Dec 2011 15:51:05 +0100	[thread overview]
Message-ID: <EA2A5692-FD21-4600-B442-DE0C468E0E7A@googlemail.com> (raw)
In-Reply-To: <4EE21B89.2010306@gmail.com>


On Dec 9, 2011, at 15:30 , Török Edwin wrote:

>> Just drop Colin a mail and ask him for the current patch (should be for 2.7 or 2.8, IIRC).
> 
> FWIW 3.0 has some fixes in the OCaml bindings that may (or may not) be useful for you, like:
> findlib support, string_of_lltype not dieing on recursive structs, bindings to ipo.h,
> bindings to some additional C APIs that were missing from the OCaml ones,
> support for creating landing pads.

The prototype should not use the C/OCaml API, but emit a textual representation instead (for various reasons). The work is based on an earlier prototype I did some time ago and that was based on LLVM 2.7. IIRC Colin ported that to 2.8, because 2.9 had some fundamental differences that caused trouble with the custom calling conventions. I haven't looked into this myself, but I'm sure we can port the final patch to 3.0 once things proved working.

>>> I think it is natural that you have to make changes to LLVM,
>>> the GHC people (which now have an experimental LLVM backend) also did,
>>> and I was under the impression that the LLVM people where quite
>>> welcoming of their changes, they are glad to see LLVM being used in a
>>> non-Clang-centric project. I think your patches could bring value to
>>> LLVM, independently of the success of the ambitious ocaml backend
>>> attempt.
>> 
>> Hm, I'm not sure. It's really easy to generate LLVM code for OCaml in general, the problem is getting things to interact with legacy OCaml code, with exception handling being one of the most important issue. The required stuff will be very platform specific and very specific to OCaml, and we don't even know if it's going to work.
> 
> Is binary compatibility with a specific version of ocamlopt necessary?

It's a "nice to have" thing.

> Best regards,
> --Edwin

Benedikt

  reply	other threads:[~2011-12-09 14:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09  6:57 oleg
2011-12-09  7:52 ` Stéphane Glondu
2011-12-09  9:58   ` Gabriel Scherer
2011-12-09 10:06     ` [Caml-devel] " Jonathan Protzenko
2011-12-09 11:03     ` Mehdi Dogguy
2011-12-09 12:08     ` Benedikt Meurer
2011-12-09 12:37       ` Gabriel Scherer
2011-12-09 14:05         ` Benedikt Meurer
2011-12-09 14:30           ` Török Edwin
2011-12-09 14:51             ` Benedikt Meurer [this message]
2011-12-09 23:38             ` oliver
2011-12-09 21:22           ` Richard W.M. Jones
2011-12-10  9:36             ` Benedikt Meurer
2011-12-10 11:34   ` Jon Harrop
2011-12-09 23:01 ` oliver
2011-12-09 23:18 ` Goswin von Brederlow
2011-12-10  0:20   ` Till Varoquaux
2011-12-10  7:35   ` oleg
2011-12-10 15:40   ` Basile Starynkevitch
2011-12-10 23:56     ` Peter Hawkins
2011-12-11  8:24       ` Basile Starynkevitch

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=EA2A5692-FD21-4600-B442-DE0C468E0E7A@googlemail.com \
    --to=benedikt.meurer@googlemail.com \
    --cc=caml-list@inria.fr \
    --cc=edwintorok@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).