[pypy-commit] pypy dynamic-specialized-tuple: fix, and mark something as elidable
alex_gaynor
noreply at buildbot.pypy.org
Tue Apr 24 04:40:56 CEST 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: dynamic-specialized-tuple
Changeset: r54711:041945f6ec4d
Date: 2012-04-23 22:40 -0400
http://bitbucket.org/pypy/pypy/changeset/041945f6ec4d/
Log: fix, and mark something as elidable
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -205,11 +205,11 @@
def int_w(self, space):
raise OperationError(space.w_TypeError,
typed_unwrap_error_msg(space, "integer", self))
-
+
def uint_w(self, space):
raise OperationError(space.w_TypeError,
typed_unwrap_error_msg(space, "integer", self))
-
+
def bigint_w(self, space):
raise OperationError(space.w_TypeError,
typed_unwrap_error_msg(space, "integer", self))
@@ -759,6 +759,7 @@
self.interned_strings[s] = w_s
return w_s
+ @jit.elidable
def new_interned_str(self, s):
try:
return self.interned_strings[s]
@@ -1343,7 +1344,7 @@
if not self.is_true(self.isinstance(w_obj, self.w_str)):
raise OperationError(self.w_TypeError,
self.wrap('argument must be a string'))
- return self.str_w(w_obj)
+ return self.str_w(w_obj)
def unicode_w(self, w_obj):
return w_obj.unicode_w(self)
@@ -1655,7 +1656,7 @@
'UnicodeEncodeError',
'UnicodeDecodeError',
]
-
+
if sys.platform.startswith("win"):
ObjSpace.ExceptionTable += ['WindowsError']
diff --git a/pypy/objspace/std/tupletype.py b/pypy/objspace/std/tupletype.py
--- a/pypy/objspace/std/tupletype.py
+++ b/pypy/objspace/std/tupletype.py
@@ -91,7 +91,7 @@
assert False
@jit.look_inside_iff(lambda space, w_tuple, list_w:
- isvirtual(list_w) or (isconstant(len(list_w)) and len(list_w) <= 5)
+ jit.isvirtual(list_w) or (jit.isconstant(len(list_w)) and len(list_w) <= 5)
)
def make_tuple(space, w_tuple, list_w):
from pypy.objspace.std.tupleobject import W_TupleObject
More information about the pypy-commit
mailing list