[pypy-commit] pypy float-bytes-2: merged default in
alex_gaynor
noreply at buildbot.pypy.org
Tue Mar 27 07:28:19 CEST 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: float-bytes-2
Changeset: r54028:854291ae4aa1
Date: 2012-03-27 01:16 -0400
http://bitbucket.org/pypy/pypy/changeset/854291ae4aa1/
Log: merged default in
diff --git a/pypy/jit/backend/x86/regalloc.py b/pypy/jit/backend/x86/regalloc.py
--- a/pypy/jit/backend/x86/regalloc.py
+++ b/pypy/jit/backend/x86/regalloc.py
@@ -773,8 +773,9 @@
self.Perform(op, [loc0], loc1)
self.xrm.possibly_free_var(op.getarg(0))
else:
- loc0 = self.xrm.loc(op.getarg(0))
- loc1 = self.xrm.force_allocate_reg(op.result)
+ arg0 = op.getarg(0)
+ loc0 = self.xrm.loc(arg0)
+ loc1 = self.xrm.force_allocate_reg(op.result, forbidden_vars=[arg0])
self.Perform(op, [loc0], loc1)
self.xrm.possibly_free_var(op.getarg(0))
diff --git a/pypy/objspace/std/bytearrayobject.py b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -114,9 +114,12 @@
if step == 1 and 0 <= start <= stop:
newdata = data[start:stop]
else:
- newdata = [data[start + i*step] for i in range(slicelength)]
+ newdata = _getitem_slice_multistep(data, start, step, slicelength)
return W_BytearrayObject(newdata)
+def _getitem_slice_multistep(data, start, step, slicelength):
+ return [data[start + i*step] for i in range(slicelength)]
+
def contains__Bytearray_Int(space, w_bytearray, w_char):
char = space.int_w(w_char)
if not 0 <= char < 256:
More information about the pypy-commit
mailing list