[pypy-commit] pypy ootype-rerased: Actually implemented the opcodes.

ademan noreply at buildbot.pypy.org
Mon Jul 18 23:32:59 CEST 2011


Author: Daniel Roberts <Ademan555 at gmail.com>
Branch: ootype-rerased
Changeset: r45726:87e475193302
Date: 2011-07-18 14:20 -0700
http://bitbucket.org/pypy/pypy/changeset/87e475193302/

Log:	Actually implemented the opcodes.

diff --git a/pypy/translator/jvm/src/pypy/PyPy.java b/pypy/translator/jvm/src/pypy/PyPy.java
--- a/pypy/translator/jvm/src/pypy/PyPy.java
+++ b/pypy/translator/jvm/src/pypy/PyPy.java
@@ -307,6 +307,14 @@
         return result;
     }
 
+    public static Object box_integer(int x) {
+        return new Integer(x);
+    }
+
+    public static int unbox_integer(Object o) {
+        Integer x = (Integer)o;
+        return x.intValue();
+    }
     // Used in testing the JVM backend:
     //
     //    A series of methods which serve a similar purpose to repr() in Python:


More information about the pypy-commit mailing list