Hello Clemens,
On Fri, Oct 10, 2003 at 08:51:55AM +0200, Clemens Eisserer wrote:
> I know this is a little off-topic and I hope I?m not make anybody angry on
> this list.
That's fine. The making of JITs is not an easy subject, and it is still
somewhat research level (with Java Hotspot being one notorious exception).
This means that documentation about them is mostly available as research
papers. You may find more about them by browing CiteSeer
(http://citeseer.nj.nec.com/). If you're interested you might find some
references from the following paper: "A Brief History of Just-In-Time",
http://pages.cpsc.ucalgary.ca/~aycock/.
The bottom line, however, is that there is little "understandable"
documentation about JITs if you are not used to computer science papers, and
JITs are rarely simple.
Psyco itself is still a bit different from other JITs in some respects. I know
the sources are pretty obscure. At some point it ideas will be integrated into
the much more flexible and clear framework of the PyPy project, which should
help making the basic ideas more accessible, but we are not here yet.
(http://codespeak.net/pypy/)
In fact the PyPy project itself may be a good place to write a JavaScript
interpreter in. I, for example, would like to write a Prolog interpreter in
PyPy :-) The idea is that when PyPy is ready, writing new interpreters (in
Python, but interpreting other languages) should be straightforward, and then
the rest of PyPy can generate almost automatically a JIT from the interpreter.
It may sound unrealistic, but several of us have a pretty clear idea about how
this can be done. (The basic idea is that Psyco as it is now has large parts
that look very much like corresponding parts of CPython, e.g. all the files in
the Object subdirectory, so they could be generated automatically if CPython
were written in a higher level language than C.)
A bientot,
Armin.
|