[pypy-commit] pypy py3k: move the decoding of valuefmt later, else the annotation cannot determine that the argument to get_operation_class (which is memo-specialized) is a PBC
antocuni
noreply at buildbot.pypy.org
Sat Aug 4 15:51:36 CEST 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r56570:9dafe9ced1da
Date: 2012-08-04 15:42 +0200
http://bitbucket.org/pypy/pypy/changeset/9dafe9ced1da/
Log: move the decoding of valuefmt later, else the annotation cannot
determine that the argument to get_operation_class (which is memo-
specialized) is a PBC
diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -321,6 +321,7 @@
return tuple(parts), tuple(formats)
def get_operrcls2(valuefmt):
+ valuefmt = valuefmt.decode('ascii')
strings, formats = decompose_valuefmt(valuefmt)
assert len(strings) == len(formats) + 1
try:
@@ -372,7 +373,6 @@
1. in the py3k branch the exception message will always be unicode
2. only %s and %d are supported
"""
- valuefmt = valuefmt.decode('ascii')
OpErrFmt, strings = get_operationerr_class(valuefmt)
return OpErrFmt(w_type, strings, *args)
operationerrfmt._annspecialcase_ = 'specialize:arg(1)'
diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py
--- a/pypy/objspace/std/intobject.py
+++ b/pypy/objspace/std/intobject.py
@@ -34,7 +34,6 @@
b = b.lshift(3).or_(rbigint.fromint(tag))
return space.newlong_from_rbigint(b)
-
class W_IntObject(W_AbstractIntObject):
__slots__ = 'intval'
_immutable_fields_ = ['intval']
More information about the pypy-commit
mailing list