Author: Armin Rigo <[email protected]>
Branch:
Changeset: r80666:c03930410323
Date: 2015-11-13 15:51 +0000
http://bitbucket.org/pypy/pypy/changeset/c03930410323/
Log: fix e392b3d88ecf: we must really not write back the modified
operation in any list, but just use it when building the _newops.
diff --git a/rpython/jit/backend/llsupport/rewrite.py
b/rpython/jit/backend/llsupport/rewrite.py
--- a/rpython/jit/backend/llsupport/rewrite.py
+++ b/rpython/jit/backend/llsupport/rewrite.py
@@ -120,13 +120,14 @@
# this case means between CALLs or unknown-size mallocs.
#
operations = self.remove_bridge_exception(operations)
- self._source_operations = operations
+ self._changed_op = None
for i in range(len(operations)):
- self._current_position = i
op = operations[i]
assert op.get_forwarded() is None
if op.getopnum() == rop.DEBUG_MERGE_POINT:
continue
+ if op is self._changed_op:
+ op = self._changed_op_to
# ---------- GETFIELD_GC ----------
if op.getopnum() in (rop.GETFIELD_GC_I, rop.GETFIELD_GC_F,
rop.GETFIELD_GC_R):
@@ -213,11 +214,10 @@
self.emit_op(op1)
lst = op.getfailargs()[:]
lst[i] = op1
- operations = self._source_operations
- assert operations[self._current_position + 1] is op
newop = op.copy_and_change(opnum)
newop.setfailargs(lst)
- operations[self._current_position + 1] = newop
+ self._changed_op = op
+ self._changed_op_to = newop
# ----------
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit