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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 68815BBAF for ; Tue, 24 Mar 2009 19:30:02 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuoCAKXDyEnRVdulmGdsb2JhbACCIjGSVj8BAQEBAQgJDAcRrUOPQQEDAQODcwaFaA X-IronPort-AV: E=Sophos;i="4.38,414,1233529200"; d="scan'208";a="24904770" Received: from mail-ew0-f165.google.com ([209.85.219.165]) by mail3-smtp-sop.national.inria.fr with ESMTP; 24 Mar 2009 19:30:01 +0100 Received: by ewy9 with SMTP id 9so2355701ewy.27 for ; Tue, 24 Mar 2009 11:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=y7uJSO4MK6YH/gILZbXt+Ewr2ElafXr6F5682JUV3/U=; b=Ub7+50udat2j90uIRqvINCW7SqkY8G1DMnzM36IZE+CyD7FKi/L6i/x2RCbWgn1qiF PGVtmd7iBppa/NH3pQ+ODHWqt3h6P7EWKO7/HZGnqPlPYGuKrU8PViApu4NBd3cW5YlA SjPEjjXWt4gTT5+GAToPK3e7jYcWmysSfWcd4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=Xyr0SRz7vxiMKRAYBIoI3ChRKuowtOfnnbMZJ8zx7u0oYedTH4a/n47S/rZS1/vc9M PT+repf4odj81riRSQ+WNnIPwMxZaAhiKg7ErHf/cHgKQFa6w8ifULR3CYZK3wFeK3Lk 6qFl5x8qkS4HK8TgvlHpeT3saso5xxwU6E1mc= MIME-Version: 1.0 Sender: alpmestan@gmail.com Received: by 10.210.13.17 with SMTP id 17mr3403529ebm.15.1237919401747; Tue, 24 Mar 2009 11:30:01 -0700 (PDT) Date: Tue, 24 Mar 2009 19:30:01 +0100 X-Google-Sender-Auth: 7a5fcfd548813dc5 Message-ID: Subject: Question about the -dlambda option of ocamlc/ocamlopt From: Alp Mestan To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0015174c3cca33a5d80465e19209 X-Spam: no; 0.00; -dlambda:01 ocamlc:01 ocamlopt:01 lambda:01 ocaml:01 compiler:01 lambda:01 ocaml:01 compiler:01 blog:98 2009:98 blog:98 2009:98 variables:02 variables:02 --0015174c3cca33a5d80465e19209 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 ! -- Alp Mestan --0015174c3cca33a5d80465e19209 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

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

You can take a look at this for an examp= le :
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 !

--
Alp Mestan

--0015174c3cca33a5d80465e19209-- 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.1 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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6C8B8BBAF for ; Wed, 25 Mar 2009 10:02:42 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AscBAOePyUmBrw8EmWdsb2JhbACVbAEBAQEBCAsKBxG8eIN1Bg X-IronPort-AV: E=Sophos;i="4.38,418,1233529200"; d="scan'208";a="26272907" Received: from ext.lri.fr ([129.175.15.4]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 25 Mar 2009 10:02:42 +0100 Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 0C78DA44DB; Wed, 25 Mar 2009 10:02:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lri.fr Received: from ext.lri.fr ([127.0.0.1]) by localhost (ext.lri.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xzQVVfPJBE31; Wed, 25 Mar 2009 10:02:41 +0100 (CET) Received: from smtp.lri.fr (vhost3-23 [129.175.3.23]) by ext.lri.fr (Postfix) with ESMTP id E8A1EA4080; Wed, 25 Mar 2009 10:02:41 +0100 (CET) Received: from [129.175.4.107] (lri4-107 [129.175.4.107]) by smtp.lri.fr (Postfix) with ESMTP id EC467E04EC; Wed, 25 Mar 2009 10:02:41 +0100 (CET) Message-ID: <49C9F340.9080400@lri.fr> Date: Wed, 25 Mar 2009 10:02:56 +0100 From: Romain Bardou User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Alp Mestan Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Question about the -dlambda option of ocamlc/ocamlopt References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; lri:01 -dlambda:01 ocamlc:01 ocamlopt:01 lambda:01 ocaml:01 compiler:01 blog:98 2009:98 integer:01 caml-list:01 variables:02 represented:02 let:03 let:03 Alp Mestan a écrit : > 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 = 1 in let x = 2 in x The / allows you to know which "let" variable is represented by the "x" at the end. -- Romain Bardou 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--