[Types-sig] Plea for help.
Greg Stein
gstein@lyra.org
Fri, 10 Dec 1999 17:13:59 -0800 (PST)
On Fri, 10 Dec 1999, Paul Prescod wrote:
> Jeremy Hylton wrote:
> > I was going to suggest that a good near-term goal for the type sig
> > would be to write a Python compiler in Python, but I see that Paul has
> > beaten me to it.
>
> Not quite. I'm not going to do anything about generating bytecodes. But
> it seems to me like that would be another cool project. Someone should
> do py2pyc and add it to the py2c distribution. But I'm not going to...
P2C is in CVS (see http://www.pythonpros.com/cvs.html). If people really
want to get some work done, then we can arrange for access.
The P2C framework has been used for a couple output targets, so
generating a pyc is definitely workable.
> Yes, we will eventually want such a beast in order to allow for some
> runtime checks (since changing and distributing a Python-coded compiler
> is probably easier than changing the C-coded interpreter).
yup.
> Here's what I *would* like to do. I would like to subclass your node
> objects and build "statically resolved" subtypes. This will be a natural
> base class for a new version of py2c (which as far as I know does no
> static resolution) and for an optimizing bytecode compiler.
We have very limited type handling (and certainly no inference).
> Hopefully a big chunk of the Python 2 compiler can be written in Python
> 2.
I'm hoping to see a replaceable compiler in 1.6. Shouldn't be hard to move
the compilation step behind some hooks. Should be able to hook-ify the
parser, too.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/