From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA23298; Wed, 23 Jun 2004 17:07:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA23220 for ; Wed, 23 Jun 2004 17:07:26 +0200 (MET DST) Received: from quincy.inria.fr (quincy.inria.fr [128.93.8.52]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5NF7PSH008231; Wed, 23 Jun 2004 17:07:25 +0200 Received: by quincy.inria.fr (Postfix, from userid 23861) id A810F11C448; Wed, 23 Jun 2004 17:07:25 +0200 (CEST) Date: Wed, 23 Jun 2004 17:07:25 +0200 From: Michel Mauny To: Hendrik Tews Cc: caml-list@inria.fr Subject: Re: [Caml-list] factor 5 speed increase for natively compiled camlp4 parsers Message-ID: <20040623150725.GA2294@quincy.inria.fr> Reply-To: Michel.Mauny@inria.fr References: <16580.63367.560204.157305@ithif51.inf.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <16580.63367.560204.157305@ithif51.inf.tu-dresden.de> User-Agent: Mutt/1.4.1i X-Miltered: at concorde with ID 40D99CAD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 natively:01 camlp:01 henrik:01 hendrik:01 tews:01 2004:99 camlp:01 -linkall:01 -linkall:01 extensible:01 wether:01 wether:01 expr:01 automates:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Dear Henrik, Hendrik Tews wrote/écrivait (Tue, Jun 08, 2004 at 01:17:27AM +0200): > QUESTIONS TO EXPERTS AND CAMLP4 MAINTAINERS: > 1. Why is the -linkall neccessary? Its clear to me that one needs > the -linkall when building camlp4o. However, I don't > understand why camlp4o.opt needs the -linkall. It is because of the programming style used in the modules to be linked: some of them are not referenced (and therefore not linked in without -linkall), but have useful actions in their initialisation code, such as fill in an external reference with a function they've just defined. The -linkall option makes sure that all initialisation codes are executed. Now I agree with you that it looks strange. What I did (in the CVS) is to use -linkall for building camlp4.cmxa: this way your recipe works even without -linkall. > 2. Is the process that generates pa_o_fast.ml applicable to all > camlp4 grammars? No: it relies on the particular structure of files pa_o.ml and pa_op.ml. > Why is it not used for the revised syntax? I suspect the revised syntax is meant to stay extensible, and this extensibility would be lost if the parser was compiled `as much as' the one obtained in pa_o_fast. This is just a guess: I don't master all Camlp4 secrets (yet) ;-) > What is the option -meta_action of pa_extend.cmo doing? It decides wether actions are to be interpreted as expressions or meta-expressions (expressions at the meta-level). In short, it decides wether "2+3" is parsed as the expression 2+3 or the expression <:expr<2+3>>. > 3. Would it be possible to include a ``mknativecamlp4'' script > that automates the described procedure in the next > distribution? I'll see what I can do, but note that this not a top priority right now. > Would it be possible to build and install pa_o.cmx, pa_op.cmx, > pa_o_fast.cmx, and odyl.cmx? Done in the CVS. Thanks, -- Michel ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners