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 PAA24414; Tue, 14 Jan 2003 15:12:31 +0100 (MET) 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 PAA24540 for ; Tue, 14 Jan 2003 15:12:29 +0100 (MET) Received: from mel-rto3.wanadoo.fr (smtp-out-3.wanadoo.fr [193.252.19.233]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0EECSr03976 for ; Tue, 14 Jan 2003 15:12:29 +0100 (MET) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto3.wanadoo.fr (6.7.015) id 3E0C33B500A44DCC; Tue, 14 Jan 2003 15:12:10 +0100 Received: from warp (80.14.218.94) by mel-rta10.wanadoo.fr (6.7.015) id 3E075B5C00A54B36; Tue, 14 Jan 2003 15:12:10 +0100 Message-ID: <008201c2bbd7$6e2ad9e0$5eda0e50@warp> From: "Nicolas Cannasse" To: "Florian Hars" Cc: "Hal Daume III" , "Caml Mailing List" References: <001301c2bb7e$5e119840$41da0e50@warp> <3E23F1C0.2000604@bik-gmbh.de> Subject: Re: [Caml-list] unboxing of unary datatypes Date: Tue, 14 Jan 2003 15:15:45 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > No, I think he sees something different here: The compiler does in fact > optimize out the constructor and then operates directly on the value (which, in > this case, is a boxed float). But it does not perform the special float > optimizations it does on values of the types float, float array and > records like { x: float; y: float; ... (* All fields are floats *)} (but not on > tupels and sum types containing floats). > Yes, of course. What I wanted to say here is that such representation compiler optimisations have to be documented and somehow normalized in order to be able to interface OCaml with C. As for floats array, there is a description of how they are handled in the Manual chapter 17.3.3. As the case of only-one-constructor is not documented, then there is no optimisation :) Nicolas Cannasse ------------------- 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