cardinal-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cardinal-dev] Parrot IR compiler


From: Erik Bågfors
Subject: Re: [Cardinal-dev] Parrot IR compiler
Date: 30 May 2002 20:42:26 +0200

On Thu, 2002-05-30 at 16:55, Melvin Smith wrote:
> At 11:53 AM 5/30/2002 +0200, Erik Bågfors wrote:
> >Do I understand this correctly?  What does this IR language do?  Does it
> >only take care of register allocations?  Will it do more soon? If so
> 
> I guess that example was pretty useless, what I was showing
> was how the expressions looked. I could have chose to do them
> in a Parrot-with-symbolics style but instead I went with an intermediate
> form that is close to what compilers generate in their intermediate
> phase.

Hmm.. this sounds really interesting.  I assume that we can change the
backend of this to output code for other things that parrot?  For
exampel .Net-code or something?  Or am I confused here?

> It's basically a quadruple language (or 3-address code).
> You can emit code with unlimited temporaries and it will do the
> final compilation phases which are:
> 
> 1) Instruction selection
> 2) Register allocation and spilling
> 3) Optimization
> 
> Number 1 and 2 are phases that you will have to implement when you
> target any language to Parrot (or another cpu). So I'm just making it much 
> easier
> by writing a common backend that will work for all high level compilers.
>
> You can concentrate on writing the Lexer/Parser/Type Checking and Semantic
> phases of your compiler and then generate IR directly from your AST or DAG,
> or whatever it is you have.
>

I think this is so great! :)
 
/Erik 
-- 
Erik Bågfors               | address@hidden
Supporter of free software | GSM +46 733 279 273
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32



reply via email to

[Prev in Thread] Current Thread [Next in Thread]