[pypy-commit] pypy default: fix more copy-pastes of the same function
fijal
pypy.commits at gmail.com
Sat Mar 26 14:46:50 EDT 2016
Author: fijal
Branch:
Changeset: r83390:3c26d7439762
Date: 2016-03-26 20:46 +0200
http://bitbucket.org/pypy/pypy/changeset/3c26d7439762/
Log: fix more copy-pastes of the same function
diff --git a/rpython/jit/backend/ppc/regalloc.py b/rpython/jit/backend/ppc/regalloc.py
--- a/rpython/jit/backend/ppc/regalloc.py
+++ b/rpython/jit/backend/ppc/regalloc.py
@@ -286,7 +286,8 @@
self.assembler.mc.mark_op(op)
self.rm.position = i
self.fprm.position = i
- if op.has_no_side_effect() and op not in self.longevity:
+ opnum = op.opnum
+ if rop.has_no_side_effect(opnum) and op not in self.longevity:
i += 1
self.possibly_free_vars_for_op(op)
continue
@@ -298,8 +299,7 @@
else:
self.fprm.temp_boxes.append(box)
#
- opnum = op.getopnum()
- if not we_are_translated() and opnum == -127:
+ if not we_are_translated() and opnum == rop.FORCE_SPILL:
self._consider_force_spill(op)
else:
arglocs = oplist[opnum](self, op)
diff --git a/rpython/jit/backend/zarch/regalloc.py b/rpython/jit/backend/zarch/regalloc.py
--- a/rpython/jit/backend/zarch/regalloc.py
+++ b/rpython/jit/backend/zarch/regalloc.py
@@ -476,7 +476,8 @@
self.assembler.mc.mark_op(op)
self.rm.position = i
self.fprm.position = i
- if op.has_no_side_effect() and op not in self.longevity:
+ opnum = op.getopnum()
+ if rop.has_no_side_effect(opnum) and op not in self.longevity:
i += 1
self.possibly_free_vars_for_op(op)
continue
@@ -488,8 +489,7 @@
else:
self.fprm.temp_boxes.append(box)
#
- opnum = op.getopnum()
- if not we_are_translated() and opnum == -127:
+ if not we_are_translated() and opnum == rop.FORCE_SPILL:
self._consider_force_spill(op)
else:
arglocs = prepare_oplist[opnum](self, op)
More information about the pypy-commit
mailing list