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