Charles Oliver Nutter wrote:

 >> Moreover, I would add to this list that the possibility to compile
 >> python to jvm bytecode instead of python bytecode; maybe a pypy-jvm
 >> would be usable even without it, but e.g. developing applets requires
 >> it.
 >>
 >> Hopefully, I'll be able to work on this (an its counterpart for .NET)
 >> in the next months.

> Even just a simple backend python compiler for JVM would be a huge 
> start, since it would cover 90% of cases people are interested in any 
> sort of python-on-JVM. On the JRuby project we've gotten the most 
> interest so far from folks simply wanting access to what the JVM and 
> Java platform have to offer, and only recently from people interested in 
> improved performance. The same could likely apply to Python if PyPy 
> could produce a compiler backend for JVM.

Uhm, I'm not sure what you mean with "backend python compiler for JVM".

In PyPy's terminology, backends are the last piece of the translation 
toolchain and they are needed to translate RPython programs. If you 
meant such a backend, it's already there and works very well (it can 
compile the whole pypy interpreter for example).

If you meant a "Python to JVM bytecode compiler", that's what I was 
talking about too :-).
I'm not sure that having it will cover 90% of people interested in 
pypy-jvm; to fully exploit python on jvm we need to allow access to Java 
classes from Python (and vice-versa), but this is unrelated to having a 
python-to-jvm compiler (for example, pypy-cli allows to access .NET 
classes without compiling python code to CLI).

Also, the current plan for having a Python-to-jvm compiler is not to 
write it by hand, but to automatically generating it by reusing the same 
techniques we use for JIT, i.e. by partially evaluating the main 
interpreter loop assuming the bytecode as a constant. This approach will 
have the advantages of a) being correct "by design" b) working for both 
pypy-jvm and pypy-cli and c) working not only for python, but also for 
other languages implemented in rpython.

ciao Anto
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to