caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Question about the -dlambda option of ocamlc/ocamlopt
@ 2009-03-24 18:30 Alp Mestan
  2009-03-25  9:02 ` [Caml-list] " Romain Bardou
  0 siblings, 1 reply; 3+ messages in thread
From: Alp Mestan @ 2009-03-24 18:30 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]

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 !

-- 
Alp Mestan

[-- Attachment #2: Type: text/html, Size: 545 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Question about the -dlambda option of ocamlc/ocamlopt
  2009-03-24 18:30 Question about the -dlambda option of ocamlc/ocamlopt Alp Mestan
@ 2009-03-25  9:02 ` Romain Bardou
  2009-03-25 10:07   ` Alp Mestan
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Bardou @ 2009-03-25  9:02 UTC (permalink / raw)
  To: Alp Mestan; +Cc: caml-list

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 '/<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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Question about the -dlambda option of ocamlc/ocamlopt
  2009-03-25  9:02 ` [Caml-list] " Romain Bardou
@ 2009-03-25 10:07   ` Alp Mestan
  0 siblings, 0 replies; 3+ messages in thread
From: Alp Mestan @ 2009-03-25 10:07 UTC (permalink / raw)
  To: Romain Bardou, caml-list

[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]

Thanks Romain !

On Wed, Mar 25, 2009 at 10:02 AM, Romain Bardou <Romain.Bardou@lri.fr>wrote:

> 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 '/<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
>



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

[-- Attachment #2: Type: text/html, Size: 1679 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-25 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-24 18:30 Question about the -dlambda option of ocamlc/ocamlopt Alp Mestan
2009-03-25  9:02 ` [Caml-list] " Romain Bardou
2009-03-25 10:07   ` Alp Mestan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).