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=2.8 required=5.0 tests=DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 3421FBBAF for ; Wed, 25 Mar 2009 11:07:39 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As8BAGCfyUnRVdulmGdsb2JhbACCJC+SWj8BAQEBAQgJDAcRrGyPeAEDAQODcgaFcQ X-IronPort-AV: E=Sophos;i="4.38,418,1233529200"; d="scan'208";a="23222938" Received: from mail-ew0-f165.google.com ([209.85.219.165]) by mail2-smtp-roc.national.inria.fr with ESMTP; 25 Mar 2009 11:07:38 +0100 Received: by ewy9 with SMTP id 9so2600560ewy.27 for ; Wed, 25 Mar 2009 03:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=4SLJU5vyRZZdVyKZ8dzv0lb1dmGRZaz1Z19Hf84n2Q0=; b=vgsTpDO0f+UQl/0dGJIIVU5iaAmfMoaYAj4NbSPxtyo473/+YTanj1l6bcGfmfYVdV zje44eyLMJLGr3DDMVHgxOEpB+kroqCstPm/csetLB73ojuVU+64fYIpH6HgfJZUx9lo kirYQlkrgd2JcjYgl/CnJcmFgD1pK/Zzvso4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=th1BRVeKSb351uDpA9VDYHUMlOznkRweEWncbwqIk1yH5Tc6re/7ktDQBqgSqkZaXx jXpwgXoShP0rS5Oz1wHprYtgYQCaVTC0gmswdzMGdxAIS41XiXYUin6qYBywSCPLFTAt 5YlD7Ow7YqNBgPgT5mpF7LpUN+5P9A2virhRs= MIME-Version: 1.0 Sender: alpmestan@gmail.com Received: by 10.210.89.4 with SMTP id m4mr6483070ebb.65.1237975658726; Wed, 25 Mar 2009 03:07:38 -0700 (PDT) In-Reply-To: <49C9F340.9080400@lri.fr> References: <49C9F340.9080400@lri.fr> Date: Wed, 25 Mar 2009 11:07:38 +0100 X-Google-Sender-Auth: 0f3897b8c16bb362 Message-ID: Subject: Re: [Caml-list] Question about the -dlambda option of ocamlc/ocamlopt From: Alp Mestan To: Romain Bardou , caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0015174bde846107f00465eeab40 X-Spam: no; 0.00; -dlambda:01 ocamlc:01 ocamlopt:01 lri:01 lambda:01 ocaml:01 compiler:01 lri:01 lambda:01 ocaml:01 compiler:01 2009:98 blog:98 2009:98 blog:98 --0015174bde846107f00465eeab40 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Romain ! On Wed, Mar 25, 2009 at 10:02 AM, Romain Bardou wrote= : > Alp Mestan a =E9crit : > > Hi, >> >> I'm currently studying the lambda code generation phase of the standard >> OCaml compiler. >> >> You can take a look at this for an example : >> http://blog.mestan.fr/2009/03/22/ocaml-and-dlambda-1/ >> >> I'm wondering what is 'makeblock' for ? >> And why is there '/' after every variable/function name ? Isn'= t >> the name sufficient for identifying variables ? >> >> Thanks ! >> > > If I recall correctly, makeblock is for block allocation and is used to > make empty blocks for everything that does not fit in just one integer. > > The / is used to uniquely identify identifiers. In this example= : > > let x =3D 1 in let x =3D 2 in x > > The / allows you to know which "let" variable is represented by > the "x" at the end. > > -- > Romain Bardou > --=20 Alp Mestan In charge of the C++ section on Developpez.com. --0015174bde846107f00465eeab40 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Romain !

On Wed, Mar 25, 2009 at 1= 0:02 AM, Romain Bardou <Romain.Bardou@lri.fr> wrote:
Alp Mestan a =E9crit :

Hi,

I'm currently studying the lambda code generation phase of the standard= OCaml compiler.

You can take a look at this for an example : http://blog.mestan.fr= /2009/03/22/ocaml-and-dlambda-1/

I'm wondering what is 'makeblock' for ?
And why is there '/<a number>' after every variable/function = name ? Isn't the name sufficient for identifying variables ?

Thanks !

If I recall correctly, makeblock is for block allocation and is used to mak= e empty blocks for everything that does not fit in just one integer.

The /<a number> is used to uniquely identify identifiers. In this exa= mple :

let x =3D 1 in let x =3D 2 in x

The /<a number> allows you to know which "let" variable is = represented by the "x" at the end.

--
Romain Bardou



--
Alp Mestan
In= charge of the C++ section on Developpez.com.
--0015174bde846107f00465eeab40--