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

pdg at codespeak.net pdg at codespeak.net
Tue Jun 19 02:40:34 CEST 2007


Author: pdg
Date: Tue Jun 19 02:40:33 2007
New Revision: 44356

Modified:
   pypy/dist/pypy/translator/jvm/opcodes.py
   pypy/dist/pypy/translator/jvm/test/test_float.py
   pypy/dist/pypy/translator/jvm/test/test_int.py
Log:
translator/jvm - updated opcodes for preliminary ovf work; updated tests from the bugs anto helped fix today (pdg)

Modified: pypy/dist/pypy/translator/jvm/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/opcodes.py	(original)
+++ pypy/dist/pypy/translator/jvm/opcodes.py	Tue Jun 19 02:40:33 2007
@@ -34,6 +34,18 @@
 def _check_ovf(op):
     # TODO
     return op
+    
+def _check_unary_ovf(op):
+    # TODO  We should just use rlib's overflow dtection
+    # Assume LLONG_MIN = (- LLONG_MAX-1)
+#    if op.operand == LLONG_MIN:
+#        return [TranslateException(
+#            jvmtype.jArithmeticException,
+#            'throwOverflowError',
+#            _proc(op))]
+#    else:
+#        return op
+    return op
 
 # This table maps the opcodes to micro-ops for processing them.
 # It is post-processed by _proc.

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	Tue Jun 19 02:40:33 2007
@@ -25,7 +25,7 @@
         py.test.skip("JVM backend unknown opcode float_pow")
         
     def test_float_constant_conversions(self):
-        py.test.skip("JVM backend lacks appropriate percision")
+        py.test.skip("JVM backend lacks appropriate percision; 42.000000614400001 == 42.0")
         
     def test_from_r_uint(self):
         py.test.skip("JVM backend lacks appropriate percision")

Modified: pypy/dist/pypy/translator/jvm/test/test_int.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_int.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_int.py	Tue Jun 19 02:40:33 2007
@@ -18,9 +18,6 @@
 
     def test_rarithmetic(self):
         pass # does this make more sense in jvm
-    
-    def test_float_conversion_implicit(self):
-        py.test.skip("JVM backend lacks appropriate precision")
         
     def test_neg_abs_ovf(self):
         py.test.skip("Unaware how to handle overflow")



More information about the Pypy-commit mailing list