[pypy-dev] CLI code generation

Niklaus Haldimann nhaldimann at gmx.ch
Mon Mar 20 22:05:27 CET 2006

Hi Antonio

Antonio Cuni wrote:
> I have not yet studied the ootypesystem in details, so by now I can't
> say if it is tailored for CLI object model: if it's not I think the best
> thing is to extend the ootypesystem to introduce additional features, if
> it's not a problem; this should simplify the writing of future backends
> with object models similar to the CLI's one, such as Java.
> Since I decided to use the ootypesystem I started from gensqueak, but
> now the code looks very different, because of smalltalk and CLI are two
> very different targets; the most interesting thing I borrowed from
> gensqueak (and genjs) is the test-model, with a class that wraps the
> compiled executable and behave like a normal python function, thus
> simplifying the testing; by now it only supports integer arguments, but
> it's not a problem since the generator can generate only integer
> operations :-).

I'm the guy who's working a bit on the Smalltalk backend at the moment.
I'm very interested to see how your CLI backend progresses! Ideally, all
high-level backends (those based on the ootypesystem) should be able to
share some code and concepts. I haven't yet put much thought into this
while working on gensqueak, though. But if you see ways to share some
abstractions between gencli and gensqueak, you're very welcome to share
your ideas or refactor code. I will also watch what you are doing to
look for opportunities to unify things.

And just a hint, because no one mentioned it to you, yet: Many PyPy
developers hang out on the IRC #pypy channel on irc.freenode.net. It's a
good place to ask questions and get a sort of virtual office feeling
when you're working alone at home. ;)


More information about the Pypy-dev mailing list