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

antocuni at codespeak.net antocuni at codespeak.net
Fri Aug 31 11:24:07 CEST 2007


Author: antocuni
Date: Fri Aug 31 11:24:06 2007
New Revision: 46213

Modified:
   pypy/dist/pypy/translator/jvm/opcodes.py
   pypy/dist/pypy/translator/jvm/test/test_op.py
Log:
make some tests in test_op passing.

llong_rshift caused the verifier to complain because LSHR's second
operand needs to be integer, not long.



Modified: pypy/dist/pypy/translator/jvm/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/opcodes.py	(original)
+++ pypy/dist/pypy/translator/jvm/opcodes.py	Fri Aug 31 11:24:06 2007
@@ -33,6 +33,8 @@
 
 def _check_ovf(op):
     return op
+
+Ignore = []
     
 
 # This table maps the opcodes to micro-ops for processing them.
@@ -65,7 +67,7 @@
     'cast_ptr_to_weakadr':      [CastPtrToWeakAddress],
     'cast_weakadr_to_ptr':      CastWeakAddressToPtr,
     #'gc__collect':              'call void class [mscorlib]System.GC::Collect()',
-    #'resume_point':             Ignore,
+    'resume_point':             Ignore,
 
     'debug_assert':              [], # TODO: implement?
 
@@ -197,7 +199,7 @@
     'llong_and':                jvmgen.LAND,
     'llong_or':                 jvmgen.LOR,
     'llong_lshift':             jvmgen.LSHL,
-    'llong_rshift':             jvmgen.LSHR,
+    'llong_rshift':             [PushAllArgs, jvmgen.L2I, jvmgen.LSHR, StoreResult],
     'llong_xor':                jvmgen.LXOR,
     'llong_floordiv_ovf':       jvmgen.LDIV, # these can't overflow!
     'llong_mod_ovf':            jvmgen.LREMOVF,

Modified: pypy/dist/pypy/translator/jvm/test/test_op.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_op.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/test_op.py	Fri Aug 31 11:24:06 2007
@@ -5,18 +5,7 @@
 # ====> ../../oosupport/test_template/operations.py
 
 class TestOperations(JvmTest, BaseTestOperations):
-    def test_two_overflows(self):
-        py.test.skip("Backend lacks appropriate precision")
-        
-    def test_ignore_resume_point(self):
-        py.test.skip("Unknown opcode resume_point")
-        
-    def test_rshift(self):
-        py.test.skip("VerifyError happens. Expecting int on the stack")
-        
-    def test_uint_neg(self):
-        py.test.skip("Backend lacks appropriate precision")
-       
+
     def test_eq(self):
         py.test.skip("Str to long is not implemented, needed for test")
         
@@ -46,4 +35,4 @@
         
     def test_is_early_constant(self):
         py.test.skip("Unknown opcode is_early_constant")
-        
\ No newline at end of file
+        



More information about the Pypy-commit mailing list