Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Question about the -dlambda option of ocamlc/ocamlopt
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-25 (09:02)
From: Romain Bardou <Romain.Bardou@l...>
Subject: Re: [Caml-list] Question about the -dlambda option of ocamlc/ocamlopt
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 : 
> 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 
make empty blocks for everything that does not fit in just one integer.

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

let x = 1 in let x = 2 in x

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

Romain Bardou