Introducing PIRATE.

Vasily Chekalkin bacek at bacek.com
Mon Jun 28 21:57:13 UTC 2010


Hello.

I think it's now time to "formally" introduce PIRATE on which I,
cotto, tcurtis and other people work recently.

"PIRATE is PIR compiler implemented in NQP/PCT". Main reasons behind
development (for me at least):
1. -Ofun. It was interesting expirience to implement compiler for
somehow useful language.
2. Ability to emit PBC directly from POST.
3. Retire IMCC in future.

PIRATE consists of two large parts:
1. PIR parser.It's mostly done. 2 things isn't finished yet: proper
string handling (encoding/charset/interpolation)
2. POST pbc emitter.

For ability to emit PBC from POST I extended POST from parrot trunk to
have more semantically reach. E.g. trunk's POST::Sub.add_param just
add chunk of text. POST::Op's arguments are just junks of texts, etc.
In PIRATE I introduced various POST::* classes insted. E.g.
POST::Register to hold registers, POST::Constant for constants, etc.

Currently PIRATE can emit "sub-optimal" PBC for simple pir files. E.g.
patched fib.pir (there is no "@ARGV" support atm).

tcurtis++ work on "real-life" application for his GSoC's past
optimization framework.

I'm going finish PBC emiting in terms of fully support required
features (sub modifiers, different call typess, etc).

After this we can update PAST::Compiler to emit "new" POST and stop
depending on IMCC for PCT-based languages.

Using of PIRATE as drop-in replacement of IMCC is in
"nice-to-have-but-there-is-no-dealine" todo list.

-- 
Bacek.

P.S. It's on http://github.com/bacek/pir/. Anyone with signed CLA can
ping me on IRC or via email to get commit bit.


More information about the parrot-dev mailing list