[pypy-svn] r79464 - in pypy/branch/rlist-jit/pypy: interpreter module/exceptions objspace/std
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 24 15:15:39 CET 2010
Author: arigo
Date: Wed Nov 24 15:15:37 2010
New Revision: 79464
Modified:
pypy/branch/rlist-jit/pypy/interpreter/baseobjspace.py
pypy/branch/rlist-jit/pypy/module/exceptions/interp_exceptions.py
pypy/branch/rlist-jit/pypy/objspace/std/objspace.py
Log:
Revert these files to their original status too.
Modified: pypy/branch/rlist-jit/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/branch/rlist-jit/pypy/interpreter/baseobjspace.py (original)
+++ pypy/branch/rlist-jit/pypy/interpreter/baseobjspace.py Wed Nov 24 15:15:37 2010
@@ -8,7 +8,7 @@
from pypy.tool.cache import Cache
from pypy.tool.uid import HUGEVAL_BYTES
from pypy.rlib.objectmodel import we_are_translated
-from pypy.rlib.debug import make_sure_not_resized, list_not_modified_any_more
+from pypy.rlib.debug import make_sure_not_resized
from pypy.rlib.timer import DummyTimer, Timer
from pypy.rlib.rarithmetic import r_uint
from pypy.rlib import jit
@@ -764,10 +764,9 @@
'unpackiterable_unroll'))
def fixedview(self, w_iterable, expected_length=-1):
- """ A fixed list view of w_iterable. The result is supposed to be
- used temporarily: it is a list with the annotation flag 'do not mutate'.
+ """ A fixed list view of w_iterable. Don't modify the result
"""
- return list_not_modified_any_more(self.unpackiterable(w_iterable,
+ return make_sure_not_resized(self.unpackiterable(w_iterable,
expected_length)[:])
fixedview_unroll = fixedview
Modified: pypy/branch/rlist-jit/pypy/module/exceptions/interp_exceptions.py
==============================================================================
--- pypy/branch/rlist-jit/pypy/module/exceptions/interp_exceptions.py (original)
+++ pypy/branch/rlist-jit/pypy/module/exceptions/interp_exceptions.py Wed Nov 24 15:15:37 2010
@@ -77,7 +77,6 @@
from pypy.interpreter.gateway import interp2app, Arguments
from pypy.interpreter.error import OperationError
from pypy.rlib import rwin32
-from pypy.rlib.debug import list_not_modified_any_more
def readwrite_attrproperty_w(name, cls):
def fget(space, obj):
@@ -93,15 +92,11 @@
and will be deprecated at some point.
"""
w_dict = None
- _empty_args_w = []
+ args_w = []
def __init__(self, space):
self.space = space
self.w_message = space.w_None
- self.args_w = list_not_modified_any_more(W_BaseException._empty_args_w)
- # Note that 'self.args_w' is annotated as a list-that-is-not-modified,
- # which cannot easily be mixed together with a general list annotation.
- # That's why we use 'list_not_modified_any_more()'.
def descr_init(self, space, args_w):
self.args_w = args_w
@@ -332,7 +327,7 @@
self.w_strerror = args_w[1]
if len(args_w) == 3:
self.w_filename = args_w[2]
- self.args_w = list_not_modified_any_more([args_w[0], args_w[1]])
+ self.args_w = [args_w[0], args_w[1]]
descr_init.unwrap_spec = ['self', ObjSpace, 'args_w']
# since we rebind args_w, we need special reduce, grump
Modified: pypy/branch/rlist-jit/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/branch/rlist-jit/pypy/objspace/std/objspace.py (original)
+++ pypy/branch/rlist-jit/pypy/objspace/std/objspace.py Wed Nov 24 15:15:37 2010
@@ -363,7 +363,7 @@
if isinstance(w_obj, W_TupleObject):
t = _list_annotated_as_modifiable_again(w_obj.wrappeditems)
elif isinstance(w_obj, W_ListObject):
- t = list_not_modified_any_more(w_obj.wrappeditems[:])
+ t = w_obj.wrappeditems[:]
else:
if unroll:
return make_sure_not_resized(ObjSpace.unpackiterable_unroll(
More information about the Pypy-commit
mailing list