[pypy-svn] r44099 - in pypy/dist/pypy/translator/jvm: . test
pdg at codespeak.net
pdg at codespeak.net
Thu Jun 7 18:32:33 CEST 2007
Author: pdg
Date: Thu Jun 7 18:32:32 2007
New Revision: 44099
Modified:
pypy/dist/pypy/translator/jvm/generator.py
pypy/dist/pypy/translator/jvm/opcodes.py
pypy/dist/pypy/translator/jvm/test/test_int.py
Log:
translator/jvm - added an opcode to handle longlong_to_float; updated tests with more detailed skip messages
Modified: pypy/dist/pypy/translator/jvm/generator.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/generator.py (original)
+++ pypy/dist/pypy/translator/jvm/generator.py Thu Jun 7 18:32:32 2007
@@ -215,6 +215,7 @@
I2L = Opcode('i2l')
D2I= Opcode('d2i')
L2I = Opcode('l2i')
+L2D = Opcode('l2d')
ATHROW = Opcode('athrow')
DNEG = Opcode('dneg')
DADD = Opcode('dadd')
Modified: pypy/dist/pypy/translator/jvm/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/opcodes.py (original)
+++ pypy/dist/pypy/translator/jvm/opcodes.py Thu Jun 7 18:32:32 2007
@@ -84,7 +84,7 @@
'int_is_true': 'not_equals_zero',
'int_neg': jvmgen.INEG,
- 'int_neg_ovf': None, # How to handle overflow?
+ 'int_neg_ovf': _check_ovf(jvmgen.INEG), # How to handle overflow?
'int_abs': 'iabs',
'int_abs_ovf': _check_ovf('iabs'),
'int_invert': 'bitwise_negate',
@@ -233,6 +233,7 @@
'cast_float_to_int': jvmgen.D2I,
'cast_float_to_uint': jvmgen.PYPYDOUBLETOUINT,
'truncate_longlong_to_int': jvmgen.L2I,
+ 'cast_longlong_to_float': jvmgen.L2D,
}
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 Thu Jun 7 18:32:32 2007
@@ -20,14 +20,11 @@
def test_specializing_int_functions(self):
py.test.skip("Error with longlong precision results in 2 == 1")
- def test_float_conversion(self):
- py.test.skip("Unknown opcode cast_longlong_to_float")
-
def test_float_conversion_implicit(self):
- py.test.skip("Unknown opcode cast_longlong_to_float")
+ py.test.skip("Error with longlong precision results in 2 == 1")
def test_neg_abs_ovf(self):
- py.test.skip("emit doesn't get str or opcode, but None")
+ py.test.skip("Unaware how to handle overflow")
def test_protected_div_mod(self):
py.test.skip("fails because of unusual exception propagation")
More information about the Pypy-commit
mailing list