[pypy-dev] JVM backend - status and future work possibilities?

Antonio Cuni anto.cuni at gmail.com
Fri May 13 00:08:20 CEST 2011


On 11/05/11 23:02, Michał Bendowski wrote:
> Welcome everyone :)
> 
> I was wondering what is the current status of the JVM backend.
[cut]

Hello Michał, Dario, Bo,
I'm glad to see that there is interest around the JVM backend :-)

Here is a summary of the current status and possible future direction.

What works: translation of the basic interpreter to JVM

What does not work/it's not there:

  1) integration with the JVM classes at the RPython level
  2) integration with the JVM classes at application level
  3) JIT backend
  4) a lot of modules which currently only work with the C backend

Point (1) is a blocker for the rest, so it must be done before everything else.

The idea, is to be able to instantiate java classes and call java methods from
RPython code: the JVM backend will then turn these into the corresponding
bytecode (invokespecial/invokevirtual).  This is "easy", but you need a deep
understanding of the internals of the RPython toolchain to implement this (in
particular, the annotation and the rtyping phases).

The other requirement is that we want to be able to do JVM call also during
testing.  As know, RPython is a subset of Python, and you can either translate
it to C/JVM/CLI or execute it directly on top of CPython.  The latter is what
we do all the time when doing testing.  Testing on top of CPython is extremely
convenient for a large number of reasons which I'm not going to explain
because it's late :-)

We do not want to loose the possibility of testing on top of CPython, even
when our RPython code contains calls to JVM classes.  So, we need a way to
interface with the JVM from CPython, and this is why I asked Dario to
investigate on JPype and JTool.

Once step (1) is complete, the other tasks can be done in parallel.

ciao,
Anto


More information about the pypy-dev mailing list