compilation

From: Jean-Christophe Filliatre (Jean-Christophe.Filliatre@ens-lyon.fr)
Date: Thu Feb 13 1997 - 16:24:19 MET


Date: Thu, 13 Feb 1997 16:24:19 +0100 (MET)
Message-Id: <199702131524.QAA03489@anjou.ens-lyon.fr>
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@ens-lyon.fr>
To: caml-list@inria.fr
Subject: compilation

[english translation at the end of this mail]

Bonjour,

1. J'aimerai savoir si :

        let b = true
        let f = if b then f1 else f2

   est compilé en f1, c'est-à-dire si la branche d'un "if" est
   directement sélectionnée lorsque le booléen est "true" ou "false"
   (sans l'évaluer, bien sûr ; simplement directement égal à "true" ou
   "false" au moment de la compilation)
   La raison de ma question est que cela permettrait d'avoir des options
   de compilation directement en Caml sans perdre d'efficacité.

2. de la même manière, est-ce que

        let f = ...
        let f1 = f
        
   est compilé en remplaçant tout appel à f1 par un appel à f ?
   Ma question est, là encore, de savoir si on ne perd pas
   d'efficacité en renommant des fonctions.

Merci.
--Jean-Christophe.
  email: Jean-Christophe.Filliatre@ens-lyon.fr
  WWW : http://www.ens-lyon.fr/~jcfillia

 
=english=====================================================================

1. I would like to know if

        let b = true
        let f = if b then f1 else f2

is compiled as f1, that is if the branch of an "if" expression is
directly selected when the boolean expression is "true" or "false"
(without performing any computation on it, of course; just directly
equal to the constructor "true" or "false").
The reason of this question is that it would allow compile options in
Caml without any loss of efficiency.

2. the same way, is

        let f = ...
        let f1 = f

compiled by replacing any call to f1 by a call to f ?
The question is still to known if we don't loose efficiency by
renaming functions.

Thank you,
--Jean-Christophe.



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:09 MET