[pypy-commit] pypy default: Document @specialize.ll_and_arg.

alex_gaynor noreply at buildbot.pypy.org
Fri Sep 23 22:07:04 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r47571:829693c8e422
Date: 2011-09-23 16:06 -0400
http://bitbucket.org/pypy/pypy/changeset/829693c8e422/

Log:	Document @specialize.ll_and_arg.

diff --git a/pypy/rlib/objectmodel.py b/pypy/rlib/objectmodel.py
--- a/pypy/rlib/objectmodel.py
+++ b/pypy/rlib/objectmodel.py
@@ -70,11 +70,12 @@
 
         return decorated_func
 
-    def ll_and_arg(self, arg):
-        """ XXX what does that do?
+    def ll_and_arg(self, *args):
+        """ This is like ll(), but instead of specializing on all arguments,
+        specializes on only the arguments at the given positions
         """
         def decorated_func(func):
-            func._annspecialcase_ = 'specialize:ll_and_arg(%d)' % arg
+            func._annspecialcase_ = 'specialize:ll_and_arg' + self._wrap(args)
             return func
 
         return decorated_func


More information about the pypy-commit mailing list