[pypy-svn] r45417 - in pypy/dist/pypy/translator/jvm: . src/pypy test
pdg at codespeak.net
pdg at codespeak.net
Fri Jul 27 21:24:54 CEST 2007
Author: pdg
Date: Fri Jul 27 21:24:53 2007
New Revision: 45417
Modified:
pypy/dist/pypy/translator/jvm/opcodes.py
pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java
pypy/dist/pypy/translator/jvm/test/test_cast.py
Log:
translator/jvm - Cleaned up some files and made clear that the new code PyPy.java for casting bools to floats should later be replaced with straight jasmin code (pdg)
Modified: pypy/dist/pypy/translator/jvm/opcodes.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/opcodes.py (original)
+++ pypy/dist/pypy/translator/jvm/opcodes.py Fri Jul 27 21:24:53 2007
@@ -229,8 +229,7 @@
# 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],
- 'cast_bool_to_float': jvmgen.PYPYBOOLTODOUBLE, #PAUL
+ 'cast_bool_to_float': jvmgen.PYPYBOOLTODOUBLE, #PAUL, This should be replaced with JASMIN code later for spee, This should be replaced with JASMIN code later for speedd
'cast_char_to_int': DoNothing,
'cast_unichar_to_int': DoNothing,
Modified: pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java
==============================================================================
--- pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java (original)
+++ pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java Fri Jul 27 21:24:53 2007
@@ -199,7 +199,7 @@
return s.charAt(0);
}
- public static double bool_to_double(boolean b) {
+ public static double bool_to_double(boolean b) { //This should be replaced with JASMIN code later
double result;
if (b)
result = 1.0;
Modified: pypy/dist/pypy/translator/jvm/test/test_cast.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/test_cast.py (original)
+++ pypy/dist/pypy/translator/jvm/test/test_cast.py Fri Jul 27 21:24:53 2007
@@ -7,6 +7,3 @@
def test_uint_to_float(self):
# This is most likely with how we render uints when we print them, and they get parsed.
py.test.skip('Same issue seen in other tests with uints... 2147450880.0 == 2147483648.0')
-
- #def test_bool_to_float(self):
- # py.test.skip('fixme!')
More information about the Pypy-commit
mailing list