[pypy-svn] r41722 - pypy/dist/pypy/doc

niko at codespeak.net niko at codespeak.net
Fri Mar 30 17:56:57 CEST 2007


Author: niko
Date: Fri Mar 30 17:56:56 2007
New Revision: 41722

Modified:
   pypy/dist/pypy/doc/getting-started.txt
Log:
add text describing how to translate RPystone with the JVM backend

Modified: pypy/dist/pypy/doc/getting-started.txt
==============================================================================
--- pypy/dist/pypy/doc/getting-started.txt	(original)
+++ pypy/dist/pypy/doc/getting-started.txt	Fri Mar 30 17:56:56 2007
@@ -554,6 +554,41 @@
 users need the `.NET Framework SDK 2.0`_, while Linux and Mac users
 can use Mono_.
 
+Translating RPystone to JVM code
+++++++++++++++++++++++++++++++++
+
+Although the JVM backend has not yet been integrated with the
+interactive translator, you can use it to translate the RPystone
+benchmark with the ``pypy/goal/translate.py`` script.
+
+To do so, run the following commands:
+
+    $ cd pypy/translator/goal/
+    $ python translate.py -b jvm targetrpystonedalone.py
+    ... lots of output follows ...
+
+If all is successful, the resulting files will be stored in the
+``/tmp/usession-*`` directories.  It can be executed as follows:
+
+    $ java -cp /tmp/usession-<username>/pypy pypy.Main
+    RPystone(41682) time for 10000000 passes = 13.0
+    This machine benchmarks at 769230.7692307692 pystones/second
+
+To successfully use the JVM, however, you will need to have both a
+`JDK`_ installed (at least version 5), and the `Jasmin assembler`_.
+Furthermore, you need a script on your path called ``jasmin`` which
+runs the Jasmin jar file, something like the following:
+
+.. _`JDK`: http://java.sun.com/javase/downloads/
+.. _`Jasmin assembler`: http://jasmin.sourceforge.net/
+
+    $ cat `which jasmin`
+    #!/bin/bash
+    java -jar $PATH_TO_JASMIN_JAR "$@"
+
+As the JVM backend matures, it will naturally be more fully
+integrated into the PyPy toolchain.  
+
 A slightly larger example
 +++++++++++++++++++++++++
 



More information about the Pypy-commit mailing list