C compiler written in Python
nc-jantzegu at netcologne.de
Mon Jun 7 02:07:57 CEST 2004
From: "Thomas Guettler" <guettli at thomas-guettler.de> writes
> Cool. Next goal could be to
> compile python with it.
And the goal after could be to get rid of C :-)
Yes I really think about this:
Let us start from the bottom
Let us start with Assembler. Maybe High Level Assembler with clever macros.
Add higher datatypes if possible (I wish list and dict). Build an
environment that allows you to generate and execute assembler at runtime
This could be the basic building block for clever JIT virtual machines
(something like parrot - but small, lightweight please - if possible)
Higher level languages on top of this machine will go the Psyco/JIT way-
taking the best of Compiler and Interpreter technology. This means: not all
can be compiled at compile-time, so compile again at hot-spots in the
beginning of loops when type-information is available, save the compiled
stuff and use it as long the loop repeats ...
More information about the Python-list