[pypy-svn] r71342 - in pypy/branch/string-promote/pypy: interpreter objspace/std rlib

fijal at codespeak.net fijal at codespeak.net
Fri Feb 19 20:43:55 CET 2010


Author: fijal
Date: Fri Feb 19 20:43:54 2010
New Revision: 71342

Modified:
   pypy/branch/string-promote/pypy/interpreter/function.py
   pypy/branch/string-promote/pypy/objspace/std/sharingdict.py
   pypy/branch/string-promote/pypy/objspace/std/typeobject.py
   pypy/branch/string-promote/pypy/rlib/jit.py
Log:
Fix the decorator, also kill _pure_function_with_all...


Modified: pypy/branch/string-promote/pypy/interpreter/function.py
==============================================================================
--- pypy/branch/string-promote/pypy/interpreter/function.py	(original)
+++ pypy/branch/string-promote/pypy/interpreter/function.py	Fri Feb 19 20:43:54 2010
@@ -16,7 +16,7 @@
 
 funccallunrolling = unrolling_iterable(range(4))
 
- at jit.purefunction_promote
+ at jit.purefunction_promote()
 def _get_immutable_code(func):
     assert not func.can_change_code
     return func.code

Modified: pypy/branch/string-promote/pypy/objspace/std/sharingdict.py
==============================================================================
--- pypy/branch/string-promote/pypy/objspace/std/sharingdict.py	(original)
+++ pypy/branch/string-promote/pypy/objspace/std/sharingdict.py	Fri Feb 19 20:43:54 2010
@@ -33,11 +33,11 @@
         self.other_structs.set(added_key, new_structure)
         return new_structure
 
-    @purefunction
+    @purefunction_promote(0)
     def lookup_position(self, key):
         return self.keys.get(key, -1)
 
-    @purefunction
+    @purefunction_promote(0)
     def get_next_structure(self, key):
         new_structure = self.other_structs.get(key)
         if new_structure is None:
@@ -46,7 +46,7 @@
         self._size_estimate += new_structure.size_estimate()
         return new_structure
 
-    @purefunction_promote
+    @purefunction_promote()
     def size_estimate(self):
         return self._size_estimate >> NUM_DIGITS
 

Modified: pypy/branch/string-promote/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/branch/string-promote/pypy/objspace/std/typeobject.py	(original)
+++ pypy/branch/string-promote/pypy/objspace/std/typeobject.py	Fri Feb 19 20:43:54 2010
@@ -156,7 +156,7 @@
     def has_object_getattribute(w_self):
         return w_self.getattribute_if_not_from_object() is None
 
-    @purefunction_promote
+    @purefunction_promote()
     def _pure_version_tag(w_self):
         return w_self._version_tag
 
@@ -660,7 +660,7 @@
 def _issubtype(w_type1, w_type2):
     return w_type2 in w_type1.mro_w
 
- at purefunction_promote
+ at purefunction_promote()
 def _pure_issubtype(w_type1, w_type2, version_tag1, version_tag2):
     return _issubtype(w_type1, w_type2)
 

Modified: pypy/branch/string-promote/pypy/rlib/jit.py
==============================================================================
--- pypy/branch/string-promote/pypy/rlib/jit.py	(original)
+++ pypy/branch/string-promote/pypy/rlib/jit.py	Fri Feb 19 20:43:54 2010
@@ -29,7 +29,6 @@
     def decorator(func):
         import inspect
         purefunction(func)
-        func._pure_function_with_all_promoted_args_ = True
         args, varargs, varkw, defaults = inspect.getargspec(func)
         args = ["v%s" % (i, ) for i in range(len(args))]
         assert varargs is None and varkw is None



More information about the Pypy-commit mailing list