Author: Ronan Lamy <[email protected]>
Branch: issue-2148
Changeset: r79994:0941119321e8
Date: 2015-10-05 17:43 +0100
http://bitbucket.org/pypy/pypy/changeset/0941119321e8/

Log:    _calc_dtype() is unroll_safe since it's a search loop over a list of
        bounded length

diff --git a/pypy/module/micronumpy/ufuncs.py b/pypy/module/micronumpy/ufuncs.py
--- a/pypy/module/micronumpy/ufuncs.py
+++ b/pypy/module/micronumpy/ufuncs.py
@@ -479,6 +479,7 @@
         dt_in, dt_out = self._calc_dtype(space, dtype, out, casting)
         return dt_in, dt_out, self.func
 
+    @jit.unroll_safe
     def _calc_dtype(self, space, arg_dtype, out=None, casting='unsafe'):
         if arg_dtype.is_object():
             return arg_dtype, arg_dtype
@@ -672,6 +673,7 @@
             "requested type has type code '%s'" % (self.name, dtype.char))
 
 
+    @jit.unroll_safe
     def _calc_dtype(self, space, l_dtype, r_dtype, out, casting,
                     w_arg1, w_arg2):
         if l_dtype.is_object() or r_dtype.is_object():
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to