[pypy-svn] r45366 - in pypy/dist/pypy/translator/jvm: . test

pdg at codespeak.net pdg at codespeak.net
Thu Jul 26 21:31:13 CEST 2007


Author: pdg
Date: Thu Jul 26 21:31:12 2007
New Revision: 45366

Modified:
   pypy/dist/pypy/translator/jvm/opcodes.py
   pypy/dist/pypy/translator/jvm/test/runtest.py
   pypy/dist/pypy/translator/jvm/test/test_float.py
   pypy/dist/pypy/translator/jvm/test/test_overflow.py
   pypy/dist/pypy/translator/jvm/test/test_string.py
   pypy/dist/pypy/translator/jvm/test/test_tuple.py
Log:
pypy/translator/jvm - worked towards meeting tomorrow deadline.  No changes worht mentioning, just moved code around and tried various solutions to the bugs.  Tried to port check from CLI, but it is overly complex right now.  See the comments in the files for where Im at. (pdg)

Modified: pypy/dist/pypy/translator/jvm/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/opcodes.py	(original)
+++ pypy/dist/pypy/translator/jvm/opcodes.py	Thu Jul 26 21:31:12 2007
@@ -54,7 +54,8 @@
     'oohash':                   [PushAllArgs, jvmgen.OBJHASHCODE, StoreResult], 
     'oostring':                 [OOString, StoreResult],
     #'ooparse_int':              [PushAllArgs, 'call int32 [pypylib]pypy.runtime.Utils::OOParseInt(string, int32)'],
-    'oonewcustomdict':          [NewCustomDict, StoreResult],
+    'ooparse_float':            [PushAllArgs, 'call float64 [pypylib]pypy.runtime.Utils::OOParseFloat(string)'],
+	'oonewcustomdict':          [NewCustomDict, StoreResult],
     #
     'same_as':                  DoNothing,
     'hint':                     [PushArg(0), StoreResult],

Modified: pypy/dist/pypy/translator/jvm/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/runtest.py	Thu Jul 26 21:31:12 2007
@@ -28,9 +28,9 @@
 # CLI duplicate.  Needs compile_function support (see above) -Paul
 #     check is used in test_overflow
 #def check(func, annotation, args):
-#    mono = compile_function(func, annotation)
+#    jvm = compile_function(func, annotation)
 #    res1 = func(*args)
-#    res2 = mono(*args)
+#    res2 = jvm(*args)
 #
 #    if type(res1) is float:
 #        assert round(res1, FLOAT_PRECISION) == round(res2, FLOAT_PRECISION)

Modified: pypy/dist/pypy/translator/jvm/test/test_float.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_float.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_float.py	Thu Jul 26 21:31:12 2007
@@ -25,11 +25,11 @@
     def test_float_constant_conversions(self):
         py.test.skip("JVM backend lacks appropriate percision; 42.000000614400001 == 42.0")
     
-    #The JVM doesn't even have uints
+    #The JVM doesn't even have uints, these numbers are totally off
     def test_from_r_uint(self):
         py.test.skip("JVM backend lacks appropriate percision")
     
-    #The jvm doesn't even have uints
+    #The jvm doesn't even have uints, these numbers are totally off
     def test_to_r_uint(self):
         py.test.skip("JVM backend lacks appropriate percision")
         

Modified: pypy/dist/pypy/translator/jvm/test/test_overflow.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_overflow.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_overflow.py	Thu Jul 26 21:31:12 2007
@@ -1,5 +1,5 @@
-#Why can't I import check?
-#from pypy.translator.jvm.test.runtest import check
+# check does not exist because it involves an extensive overhaul on runtest.  See CLI's runtest for an example.
+#from pypy.translator.jvm.test.runtest import check 
 import py
 from pypy.translator.jvm.test.runtest import JvmTest
 from pypy.rlib.rarithmetic import ovfcheck
@@ -15,7 +15,7 @@
 #        return ovfcheck(x+y)
 #    except OverflowError:
 #        return 42
-
+#
 #def op_sub(x, y):
 #    try:
 #        return ovfcheck(x-y)

Modified: pypy/dist/pypy/translator/jvm/test/test_string.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_string.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_string.py	Thu Jul 26 21:31:12 2007
@@ -18,8 +18,8 @@
         py.test.skip("eval has trouble with evaluation of null literals")
     test_lower = test_upper
 
-    def test_float(self):
-        py.test.skip("JVM does not yet support ooparse_float")
+    #def test_float(self):
+    #    py.test.skip("JVM does not yet support ooparse_float")
 
     def test_getitem_exc(self):
         # This test is supposed to crash in a system specific way;

Modified: pypy/dist/pypy/translator/jvm/test/test_tuple.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_tuple.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_tuple.py	Thu Jul 26 21:31:12 2007
@@ -11,6 +11,8 @@
         res = self.interpret(fn, [1.0, 1.0])
         assert res.item0 == 1.0 and res.item1 == 1.0
     
+    #v116 = oosend(('ll_contains'), (<pypy.rpython.ootypesy...7cc5f0>), i_0)
+    # Arg 01: Exception in thread "main" java.lang.VerifyError
     def test_constant_tuple_contains(self):
         py.test.skip("VerifyError - Incompatible object argumemt")
         



More information about the Pypy-commit mailing list