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 KAA10046; Tue, 21 May 2002 10:57:35 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA09897 for ; Tue, 21 May 2002 10:57:34 +0200 (MET DST) Received: from web11206.mail.yahoo.com (web11206.mail.yahoo.com [216.136.131.188]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id g4L8vXL26366 for ; Tue, 21 May 2002 10:57:33 +0200 (MET DST) Message-ID: <20020521085732.19954.qmail@web11206.mail.yahoo.com> Received: from [62.64.172.41] by web11206.mail.yahoo.com via HTTP; Tue, 21 May 2002 01:57:32 PDT Date: Tue, 21 May 2002 01:57:32 -0700 (PDT) From: Noel Welsh Subject: Re: [Caml-list] Tail recursion detection To: John Max Skaller , caml-list@inria.fr In-Reply-To: <3CE84EFF.3090903@ozemail.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Tail calls are a syntactic property of the language hence there should be no need for a tail recursion detector beyond a trivial syntactic analysis. I.e. it should get 'em all. E.g. Page 329 of 'Modern Compiler Implementation in ML' ... the B_i are in tail contexts, but the C_i are not: ... 3. if C_1 then B_1 else B_2 ... Noel --- John Max Skaller wrote: > I'm in the process of writing a tail recursion > detector for > Felix... > > My question is: how smart is the Ocaml tail call > detector? > Can I optimise the above code like: __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com ------------------- 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