[pypy-dev] joeq! pypy goes jython?

holger krekel hpk at trillke.net
Sat Jun 19 11:23:37 CEST 2004

hi pypyers,

Jens-Uwe Mager pointed me to an early interesting paper about a 
JavaInJava implementation done by a Sun researcher: 


However, there is no code available, let alone under a free license. 

So i started looking around a bit more. And i found ... joeq!  This is a
real available Java/Java implementation  which is an LGPL-project on


and has a very nice overview 


joeq supports hosted (on top of another JVM) *and* native execution 
at least on linux and windows and supports threads, memory management, 
scheduling and ELF-handling. So here are some more information bits
i collected from a frist walk through the documentation and the above

joeq uses a so called QUAD intermediate representation which has some
similarities to our flow-graph representation.  It has assembler
backends (that work from the QUAD and a Bytecode representation) which 

    "generate metadata about the code, such as reference maps for
    garbage collection, exception tables, line numbers for debugging and
    generating exception tracebacks, and the locations of heap and code
    references in the code. This metadata is used by the runtime system
    and garbage collector, and to support code relocation."

Joeq also includes a Memory manager with Heap and Stack abstractions and
allowing differenc GC-strategies.  Also, it seems to support in-process
compilation and execution!  Btw, joeq is written by John Whaley who also
took part in the Jalapeno efforts and he really seems to know what he is

All i all, i think that we probably want to checkout joeq some more.  In
particular, we  might want to think about trying to generate a QUAD
representation of PyPy and reuse some of the joeq infrastructure.  We
can expect to have less integration issues than with the
Low-Level-Virtual-Machine (LLVM) project which is written in C++ (ever
worked with C++-libraries and dependencies? funfunfun).  

So, what about running PyPy in Jython, anyway? Yes, i know that Jython
does not yet fully support new-style classes and all, but ASFAIK Samuele
already put out an alpha-release and it has to be done anyway :-) 
Of course, at a later stage, we can always rewrite parts of joeq 
in plain Python :-) 

All things considered, i don't know how active the joeq project is. 
We should want to write John Whaley a mail inquiring some more about the
current state of the joeq project.  

At last, I can't help but quote a funny random bit from the joeq paper:

    We also explicitly include the implicit ``this'' parameter in the
    parameter list for instance methods, so code can treat method
    parameters uniformly. 


cheers and a nice weekend, 


More information about the Pypy-dev mailing list