[pypy-svn] r44155 - pypy/dist/pypy/translator/jvm

pdg at codespeak.net pdg at codespeak.net
Mon Jun 11 20:22:49 CEST 2007


Author: pdg
Date: Mon Jun 11 20:22:48 2007
New Revision: 44155

Modified:
   pypy/dist/pypy/translator/jvm/generator.py
   pypy/dist/pypy/translator/jvm/opcodes.py
Log:
translator/jvm - work towards float to longlong conversion

Modified: pypy/dist/pypy/translator/jvm/generator.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/generator.py	(original)
+++ pypy/dist/pypy/translator/jvm/generator.py	Mon Jun 11 20:22:48 2007
@@ -214,6 +214,7 @@
 I2D =       Opcode('i2d')
 I2L =       Opcode('i2l')
 D2I=        Opcode('d2i')
+#D2L=        Opcode('d2l') #PAUL
 L2I =       Opcode('l2i')
 L2D =       Opcode('l2d')
 ATHROW =    Opcode('athrow')
@@ -374,6 +375,7 @@
 PYPYULONGCMP =          Method.s(jPyPy, 'ulong_cmp', (jLong,jLong), jInt)
 PYPYUINTTODOUBLE =      Method.s(jPyPy, 'uint_to_double', (jInt,), jDouble)
 PYPYDOUBLETOUINT =      Method.s(jPyPy, 'double_to_uint', (jDouble,), jInt)
+#PYPYDOUBLETOLONG =      Method.s(jPyPy, 'double_to_long', (jDouble,), jLong) #PAUL
 PYPYLONGBITWISENEGATE = Method.s(jPyPy, 'long_bitwise_negate', (jLong,), jLong)
 PYPYSTRTOINT =          Method.s(jPyPy, 'str_to_int', (jString,), jInt)
 PYPYSTRTOUINT =         Method.s(jPyPy, 'str_to_uint', (jString,), jInt)

Modified: pypy/dist/pypy/translator/jvm/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/opcodes.py	(original)
+++ pypy/dist/pypy/translator/jvm/opcodes.py	Mon Jun 11 20:22:48 2007
@@ -84,7 +84,7 @@
 
     'int_is_true':              'not_equals_zero',
     'int_neg':                  jvmgen.INEG,
-    'int_neg_ovf':              _check_ovf(jvmgen.INEG), # How to handle overflow?
+    'int_neg_ovf':              None, # How to handle overflow?
     'int_abs':                  'iabs',
     'int_abs_ovf':              _check_ovf('iabs'),
     'int_invert':               'bitwise_negate',
@@ -216,7 +216,7 @@
     # when casting from bool we want that every truth value is casted
     # to 1: we can't simply DoNothing, because the CLI stack could
     # contains a truth value not equal to 1, so we should use the !=0
-    # trick.
+    # trick. #THIS COMMENT NEEDS TO BE VALIDATED AND UPDATED
     'cast_bool_to_int':         DoNothing,
     'cast_bool_to_uint':        DoNothing,
     'cast_bool_to_float':       [PushAllArgs, 'not_equals_zero', jvmgen.I2D],
@@ -231,6 +231,8 @@
     'cast_uint_to_int':         DoNothing,
     'cast_uint_to_float':       jvmgen.PYPYUINTTODOUBLE, 
     'cast_float_to_int':        jvmgen.D2I,
+    #'cast_float_to_longlong':   jvmgen.D2L, #PAUL
+    #'cast_float_to_longlong':   jvmgen.PYPYDOUBLETOLONG, #PAUL
     'cast_float_to_uint':       jvmgen.PYPYDOUBLETOUINT,
     'truncate_longlong_to_int': jvmgen.L2I,
     'cast_longlong_to_float':   jvmgen.L2D,



More information about the Pypy-commit mailing list