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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 11FF5BC69 for ; Fri, 13 Oct 2006 16:16:38 +0200 (CEST) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k9DEGLDG025296; Fri, 13 Oct 2006 16:16:21 +0200 Received: by yquem.inria.fr (Postfix, from userid 18041) id ABA1EBC69; Fri, 13 Oct 2006 16:16:21 +0200 (CEST) Date: Fri, 13 Oct 2006 16:16:21 +0200 To: Gerd Stolpmann Cc: Diego Olivier FERNANDEZ PONS , caml-list@inria.fr Subject: Re: [Caml-list] Why + vs +. but "fake" parametric polymorphism for < Message-ID: <20061013141621.GD10977@yquem.inria.fr> References: <1160630285.7649.18.camel@monad> <20061012.144518.115907516.garrigue@math.nagoya-u.ac.jp> <1160632737.7649.34.camel@monad> <20061013135650.48rwzsri8ws8coww@webmail.etu.upmc.fr> <1160741662.16545.9.camel@localhost.localdomain> <20061013144605.vvzwfl4pw0kockw8@webmail.etu.upmc.fr> <1160747618.16545.24.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1160747618.16545.24.camel@localhost.localdomain> User-Agent: Mutt/1.5.9i From: luc.maranget@inria.fr (Luc Maranget) X-Miltered: at concorde with ID 452F9FB5.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; parametric:01 polymorphism:01 maranget:01 maranget:01 ocaml's:01 inlining:01 inlined:01 gerd:01 ocamlc:01 ocamlopt:01 compilers:01 syntax:01 compilers:01 ocamlopt:01 compiler:01 > > Of course, you may ask why Ocaml's inlining feature isn't clever enough > to do late specialisation, at least of functions that can be inlined. I > don't know. > > Gerd > -- Technically, the ocamlc and ocamlopt compilers share a common front end that performs the specialization (on the so-called typed syntax, if I remember well). By design, both compilers have a lot common. Only the ocamlopt compiler performs inlining, on a later internal representation of code. As to re-performing specialisation in ocamlopt back-end, precise types are lost there, I am afraid. This may be by design. --Luc