The questions that an anonymous commenter asked on yesterdays post are worthwhile to answer, so I decided to put them into a post of its own.
If someone could explain the differences between the three goal options in terms of what they yield, that would assist my understanding of PyPy no end!
To implement a Squeak-bytecode interpreter in RPython
This yields an interpreter, on PyPy's back ends, that executes user level Squeak code (compiled in Squeak) -yes?
Yes. The interpreter will be runnable after translating them with PyPy's backends, but also be executable on top of CPython, of course (which is slow, but good for testing). It seems we will be able to load (at least rudimentary) Squeak images.
The Squeak bytecode would be PyPy jitable -yes?
Very likely, yes.
Question: Would this interpreter necessarily need to implemented the interpreter-objectspace separation (plus flowspace)? Or is this separation only required if we want to translate (including jit) Squeak bytecode?
No, we are not implementing this separation in the Smalltalk interpreter. The separation is specific to PyPy's Python interpreter because we want to use it to analyze RPython. The Smalltalk interpreter (as most other custom interpreters) will be jittable without this separation.
* to define and implement an RSqueak as PyPy frontend
This allows translation of RSqueak code to PyPy backends -much as slang does to C (but allowing more dynamism than slang). Yes?
Absolutely. Of course it really depends on lots of factors, so who knows, without trying :-). The RSqueak would have been to be really object-oriented as opposed to disguised C (like slang).
One might then write an interpreter for Squeak in RSqueak -and the result would, ceteris paribus, be identical to 1 above in terms of capabilities. Yes?
Probably, yes. Of course for some Smalltalkers it will probably seem preferable, since they don't have to deal with this icky Python language too much :-).
This second option could also be used as a starting point for a completely Smalltalk-based toolchain.
* to write a Squeak backend for PyPy
So we would have a Python interpreter running on the Squeak VM? -executing Python bytecode on top of Squeak (which would be pretty slow) -or is there a way of getting from Python source to *Squeak* bytecode a la Jython/IronPython on JVM/CLR?
The former. And yes, the main reason for not doing this is because it would be too slow.
Tuesday, October 23, 2007
Subscribe to:
Post Comments (Atom)
1 comment:
Go to this site for a really fun game!
http://www.goblinz.net/r/5354
It's fun!
Post a Comment