caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: Gilles Pirio <gilles.ocaml@googlemail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Ocaml back-end
Date: Tue, 13 Jan 2009 21:44:17 +0100	[thread overview]
Message-ID: <20090113204417.GA11624@yocto.gallu.homelinux.org> (raw)
In-Reply-To: <605bf2750901131109n4b86e00eqbe6451d1028156a7@mail.gmail.com>

Hello,

On Tue, Jan 13, 2009 at 07:09:16PM +0000, Gilles Pirio wrote:
> Greetings all..
> 
> Following up on an idea explored few weeks ago, I've now implemented the
> dynamic back-end mechanism on ocamlopt.
> 
> What would be the way to go for ocamlopt.opt? I don't think we want to have
> this dynamic back-end thingie with opt.opt as native dynlink isn't supported on
> all platforms. My approach at the momemt is to have different files for the
> back-end loader (depending on whether it is an opt or opt.opt build). So the
> makefile is a bit messier than before. Would that be ok anyway, any better way
> to do that that I'm not aware of? If this is fine, I'll submit my patch.
> 

You can play a little bit with camlp4 and pa_macro to disable certain
part of your opt.opt (like replacing dynlink call by nothing/empty
list...).

I think you can try doing this kind of conditional compilation well
enough if your changes are located in an almost central place

> On Tue, Dec 9, 2008 at 7:31 PM, Sylvain Le Gall <sylvain@le-gall.net> wrote:
> 
>     On 09-12-2008, Gilles Pirio <gilles.pirio@gmail.com> wrote:
>     >> To my mind, the best way is to provide a patch through the bug tracking
>     >> system of INRIA. This is highly probable that INRIA team doesn't accept
>     >> it directly but ask you to justify/modify it in order to fit the whole
>     >> compiler -- which could be quiet a long process in fact.
>     >
>     > It would greatly help to know what the INRIA team would consider as
>     > acceptable ahead of doing the work. What kind of guidlines would you
>     > advise me to follow? I guess I can add new passes but can I modify
>     > existing ones?
>     >
>     > The ideal solution would be to open the back-end using the dynlink
>     > library. I've done it with 3.11 to speed up development. The back-end is
>     now
>     > a cmo file. I separately compile copt0.cmo, copt1.cmo... with different
>     > back-ends. Then I can use command like: ocamlopt -copt copt0.cmo
>     myfile.ml
>     > to compile with my back-end.
>     > But even though that's a small change I'm not sure the INRIA guys would
>     > like it, right?
>     >
>     >
> 
>     This idea rocks! The best way is to begin by providing a basic patch and
>     follow this explanation:
>     http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/
>     (even if it is not said, half of the people involved are OCaml
>     developers).
> 
>     The other idea is that the smallest is the best. That's why your idea
>     rocks. If the possibility to dynamically load backend is small, it will
>     be a very good first step.
> 
>     When you will have made this first step (that can profit to all), you
>     can either submit your backend or provide it by any other mean.
> 
>     Regards
>     Sylvain Le Gall
> 
>     ps: consider fecthing a copy of the CVS

Regards
Sylvain Le Gall


      reply	other threads:[~2009-01-13 20:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06 12:48 Gilles Pirio
2008-12-06 20:02 ` [Caml-list] " Edgar Friendly
2008-12-07 21:58 ` Sylvain Le Gall
2008-12-09 15:51   ` [Caml-list] " Gilles Pirio
2008-12-09 19:31     ` Sylvain Le Gall
2009-01-13 19:09       ` [Caml-list] " Gilles Pirio
2009-01-13 20:44         ` Sylvain Le Gall [this message]

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=20090113204417.GA11624@yocto.gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --cc=caml-list@inria.fr \
    --cc=gilles.ocaml@googlemail.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).