[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]My Expression compiler : with Parrot support
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]My Expression compiler : with Parrot support |
Date: |
Mon, 21 Oct 2002 09:16:47 +1000 |
Gopal V wrote:
> As well as generates IL or Parrot code from the expression..
> It is a nice example for anyone trying to handle ASTs in
> compilers ... the nodes.tc is a simple & relatively clean example
> of a one pass codegeneration using trecc.
>
> See it a http://symonds.net/~gopalv82/code/expr_compiler.tgz
That was pretty cool Gopal. You're reading my mind on how
to generate Parrot code. I've also decided to generate imcc.
Let someone else worry about register allocation. :-)
I should have the "pm_output.h/c" files with the necessary primitives
and the object representation ready this week. Then we can bang
through the node types together.
For other DotGNU people, some Parrot terminology so that you
know what we are talking about:
pasm
The raw Parrot assembly code.
pbc
Parrot bytecode. The compiled form of pasm.
imcc
An intermediate language, similar to three-address code
that abstracts the machine details to make writing compilers
easier. The "imcc" program converts this into pasm, after
performing register allocation and various optimizations.
PMC
Parrot Magic Cookie. A representation of a value, plus
operations on that value. Sort of like an object, but
more for primitive engine objects than application-level
classes. We may need extra PMC's to represent C# concepts.
Go see the Parrot docs for more info.
Cheers,
Rhys.