[pypy-svn] r22824 - pypy/dist/pypy/jit

pedronis at codespeak.net pedronis at codespeak.net
Sun Jan 29 12:33:46 CET 2006


Author: pedronis
Date: Sun Jan 29 12:33:44 2006
New Revision: 22824

Modified:
   pypy/dist/pypy/jit/hintmodel.py
Log:
(arre, pedronis)

some more ops



Modified: pypy/dist/pypy/jit/hintmodel.py
==============================================================================
--- pypy/dist/pypy/jit/hintmodel.py	(original)
+++ pypy/dist/pypy/jit/hintmodel.py	Sun Jan 29 12:33:44 2006
@@ -7,9 +7,10 @@
                       cast_pointer
                       direct_call
                       int_is_true int_neg
-                      cast_char_to_int""".split()
+                      cast_char_to_int
+                      cast_bool_to_int""".split()
 
-BINARY_OPERATIONS = """int_add int_sub int_mul int_and int_rshift
+BINARY_OPERATIONS = """int_add int_sub int_mul int_and int_rshift int_floordiv
                        int_gt int_lt int_le int_ge int_eq int_ne""".split()
 
 class OriginTreeNode(object):
@@ -134,7 +135,7 @@
         origin.merge(hs_c1.origins)
         return SomeLLAbstractConstant(lltype.Signed, {origin: True})
 
-    cast_char_to_int = int_neg
+    cast_bool_to_int = cast_char_to_int = int_neg
 
     def int_is_true(hs_c1):
         origin = getbookkeeper().myorigin()
@@ -152,6 +153,9 @@
 
     getsubstruct = getfield
 
+    def setarrayitem(hs_a1, hs_index, hs_value):
+        hs_a1.contentdef.generalize_item(hs_value)
+
     def getarrayitem(hs_a1, hs_index):
         return hs_a1.contentdef.read_item()
 
@@ -187,7 +191,7 @@
         origin.merge(hs_c2.origins)
         return SomeLLAbstractConstant(lltype.Signed, {origin: True})
 
-    int_rshift = int_and = int_mul = int_sub = int_add
+    int_floordiv = int_rshift = int_and = int_mul = int_sub = int_add
 
     def int_gt((hs_c1, hs_c2)):
         origin = getbookkeeper().myorigin()



More information about the Pypy-commit mailing list