[pypy-svn] r62545 - pypy/branch/pyjitpl5/pypy/objspace/std

fijal at codespeak.net fijal at codespeak.net
Wed Mar 4 20:01:50 CET 2009


Author: fijal
Date: Wed Mar  4 20:01:49 2009
New Revision: 62545

Modified:
   pypy/branch/pyjitpl5/pypy/objspace/std/boolobject.py
   pypy/branch/pyjitpl5/pypy/objspace/std/intobject.py
Log:
reintroduce _immutable_ hint on Int and Bool. I think it was gone
because previous JIT was unable to cope with it


Modified: pypy/branch/pyjitpl5/pypy/objspace/std/boolobject.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/objspace/std/boolobject.py	(original)
+++ pypy/branch/pyjitpl5/pypy/objspace/std/boolobject.py	Wed Mar  4 20:01:49 2009
@@ -5,6 +5,8 @@
 class W_BoolObject(W_Object):
     from pypy.objspace.std.booltype import bool_typedef as typedef
 
+    _immutable_ = True
+
     def __init__(w_self, boolval):
         w_self.boolval = not not boolval
 

Modified: pypy/branch/pyjitpl5/pypy/objspace/std/intobject.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/objspace/std/intobject.py	(original)
+++ pypy/branch/pyjitpl5/pypy/objspace/std/intobject.py	Wed Mar  4 20:01:49 2009
@@ -13,6 +13,9 @@
 
 class W_IntObject(W_Object):
     __slots__ = 'intval'
+
+    _immutable_ = True
+    
     from pypy.objspace.std.inttype import int_typedef as typedef
     
     def __init__(w_self, intval):



More information about the Pypy-commit mailing list