[pypy-commit] pypy ppc-jit-backend: possibly free boxes returned by ensure_value_is_boxed.

edelsohn noreply at buildbot.pypy.org
Sat Jan 14 15:41:17 CET 2012


Author: edelsohn
Branch: ppc-jit-backend
Changeset: r51308:f657ede0f621
Date: 2012-01-14 09:41 -0500
http://bitbucket.org/pypy/pypy/changeset/f657ede0f621/

Log:	possibly free boxes returned by ensure_value_is_boxed.

diff --git a/pypy/jit/backend/ppc/ppcgen/regalloc.py b/pypy/jit/backend/ppc/ppcgen/regalloc.py
--- a/pypy/jit/backend/ppc/ppcgen/regalloc.py
+++ b/pypy/jit/backend/ppc/ppcgen/regalloc.py
@@ -659,11 +659,14 @@
         size, ofs, _ = unpack_arraydescr(op.getdescr())
         scale = get_scale(size)
         args = op.getarglist()
-        base_loc, _ = self._ensure_value_is_boxed(a0, args)
-        ofs_loc, _ = self._ensure_value_is_boxed(a1, args)
-        value_loc, _ = self._ensure_value_is_boxed(a2, args)
+        base_loc, base_box = self._ensure_value_is_boxed(a0, args)
+        ofs_loc, ofs_box = self._ensure_value_is_boxed(a1, args)
+        value_loc, value_box = self._ensure_value_is_boxed(a2, args)
         assert _check_imm_arg(ofs)
         scratch_loc = self.rm.get_scratch_reg(INT, [base_loc, ofs_loc])
+        self.possibly_free_var(base_box)
+        self.possibly_free_var(ofs_box)
+        self.possibly_free_var(value_box)
         assert scratch_loc not in [base_loc, ofs_loc]
         return [value_loc, base_loc, ofs_loc,
                 scratch_loc, imm(scale), imm(ofs)]


More information about the pypy-commit mailing list