[pypy-commit] pypy default: we cannot mix space.{eq, lt, gt, ...}: we need to specialize the function

antocuni noreply at buildbot.pypy.org
Fri Mar 2 15:40:29 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r53111:228da252ffd5
Date: 2012-03-02 15:39 +0100
http://bitbucket.org/pypy/pypy/changeset/228da252ffd5/

Log:	we cannot mix space.{eq,lt,gt,...}: we need to specialize the
	function

diff --git a/pypy/module/array/interp_array.py b/pypy/module/array/interp_array.py
--- a/pypy/module/array/interp_array.py
+++ b/pypy/module/array/interp_array.py
@@ -11,6 +11,7 @@
 from pypy.objspace.std.register_all import register_all
 from pypy.rlib.rarithmetic import ovfcheck
 from pypy.rlib.unroll import unrolling_iterable
+from pypy.rlib.objectmodel import specialize
 from pypy.rpython.lltypesystem import lltype, rffi
 
 
@@ -583,6 +584,7 @@
             raise OperationError(space.w_ValueError, space.wrap(msg))
 
     # Compare methods
+    @specialize.arg(3)
     def _cmp_impl(space, self, other, space_fn):
         if isinstance(other, W_ArrayBase):
             w_lst1 = array_tolist__Array(space, self)


More information about the pypy-commit mailing list