Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r84270:3bfdbf0a6101
Date: 2016-05-06 18:18 +0200
http://bitbucket.org/pypy/pypy/changeset/3bfdbf0a6101/

Log:    Remove the @specialize.arg_or_var. As far as I can tell, inside pypy
        we never ever call any of these five functions with two different
        constant arguments. Moreover for obscure reasons it crashes when we
        translate pypy with -O0 --no-allworkingmodules...

diff --git a/rpython/rlib/runicode.py b/rpython/rlib/runicode.py
--- a/rpython/rlib/runicode.py
+++ b/rpython/rlib/runicode.py
@@ -989,8 +989,6 @@
     return result.build(), pos
 
 
-# Specialize on the errorhandler when it's a constant
[email protected]_or_var(4)
 def str_decode_ascii(s, size, errors, final=False,
                      errorhandler=None):
     if errorhandler is None:
@@ -1020,8 +1018,6 @@
     return result.build()
 
 
-# Specialize on the errorhandler when it's a constant
[email protected]_or_var(3)
 def unicode_encode_ucs1_helper(p, size, errors,
                                errorhandler=None, limit=256):
     if errorhandler is None:
@@ -1064,12 +1060,10 @@
 
     return result.build()
 
[email protected]_or_var(3)
 def unicode_encode_latin_1(p, size, errors, errorhandler=None):
     res = unicode_encode_ucs1_helper(p, size, errors, errorhandler, 256)
     return res
 
[email protected]_or_var(3)
 def unicode_encode_ascii(p, size, errors, errorhandler=None):
     res = unicode_encode_ucs1_helper(p, size, errors, errorhandler, 128)
     return res
@@ -1194,8 +1188,6 @@
                 builder.append(res)
     return pos
 
-# Specialize on the errorhandler when it's a constant
[email protected]_or_var(4)
 def str_decode_unicode_escape(s, size, errors, final=False,
                               errorhandler=None,
                               unicodedata_handler=None):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to