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=1.4 required=5.0 tests=HTML_MESSAGE,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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id B351FBB84 for ; Tue, 13 Jan 2009 20:09:19 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.37,261,1231110000"; d="scan'208";a="21439030" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 13 Jan 2009 20:09:19 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id n0DJ9Ih2010597 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 13 Jan 2009 20:09:19 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMCAKV1bEnRVcirkGdsb2JhbACCPzCQbT4BAQEBCQkMBxEDrXeOEQEE X-IronPort-AV: E=Sophos;i="4.37,261,1231110000"; d="scan'208";a="22422147" Received: from wf-out-1314.google.com ([209.85.200.171]) by mail1-smtp-roc.national.inria.fr with ESMTP; 13 Jan 2009 20:09:17 +0100 Received: by wf-out-1314.google.com with SMTP id 25so157586wfa.0 for ; Tue, 13 Jan 2009 11:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=mWrBx78T2WhPC88XGF9/rpD9pfB+US98O8SghQ8s88Q=; b=dnXKLYCvi/IJ9Md3ZUJUsIG1j78nn+a3xIWJKRXR0Pfg1DRsdU5M0dSoHT6VThvLWD KtTFq2U2aaMC4o5zuyYC/AX3JhVJsSKNxQ/Rv/pTZ32jUM0nzrF7zPv3ae5Rgn0qMFR2 ch+jUc6Ge8T/TBf9L9Z33Q4uVt5XyJi/U5qnY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=oErcb1Cwq8URNnMpD+FQ8bVfyiGqP0ushhZ6vuU1YqGawcrCtcvTBoEnoxqnneoodc NjSPmdIjtdMDgwi5oKlaGV6X7a2ARwrQKVUmM7D4Z2DEz8JATmE3Wes+7ITms591m5Wl 8ArF/b/8gLfnfDRCRG2I2RMfYMNUc7kPAHn9s= Received: by 10.142.166.2 with SMTP id o2mr12979253wfe.312.1231873756345; Tue, 13 Jan 2009 11:09:16 -0800 (PST) Received: by 10.142.170.1 with HTTP; Tue, 13 Jan 2009 11:09:16 -0800 (PST) Message-ID: <605bf2750901131109n4b86e00eqbe6451d1028156a7@mail.gmail.com> Date: Tue, 13 Jan 2009 19:09:16 +0000 From: "Gilles Pirio" To: "Sylvain Le Gall" Subject: Re: [Caml-list] Re: Ocaml back-end Cc: caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_275258_218770.1231873756340" References: <605bf2750812060448u787862c9xdc2528cb61bc01d7@mail.gmail.com> X-Miltered: at discorde with ID 496CE6DE.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 ocamlopt:01 ocamlopt:01 dynlink:01 makefile:01 cheers:01 le-gall:01 bug:01 compiler:01 dynlink:01 cmo:01 copt:01 cmo:01 copt:01 ------=_Part_275258_218770.1231873756340 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. Cheers Gilles On Tue, Dec 9, 2008 at 7:31 PM, Sylvain Le Gall wrote: > On 09-12-2008, Gilles Pirio 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 > http://camlcvs.inria.fr/ > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ------=_Part_275258_218770.1231873756340 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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.

Cheers
Gilles



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
http://camlcvs.inria.fr/

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

------=_Part_275258_218770.1231873756340--