Author: Armin Rigo <ar...@tunes.org> Branch: jitframe-on-heap Changeset: r61816:e02ce6381c9e Date: 2013-02-26 09:52 +0100 http://bitbucket.org/pypy/pypy/changeset/e02ce6381c9e/
Log: Add missing stays_alive(). Otherwise, random registers may be listed incorrectly. diff --git a/rpython/jit/backend/x86/regalloc.py b/rpython/jit/backend/x86/regalloc.py --- a/rpython/jit/backend/x86/regalloc.py +++ b/rpython/jit/backend/x86/regalloc.py @@ -876,13 +876,13 @@ for box, loc in self.rm.reg_bindings.iteritems(): if loc in forbidden_regs: continue - if box.type == REF: + if box.type == REF and self.rm.stays_alive(box): assert not noregs assert isinstance(loc, RegLoc) val = gpr_reg_mgr_cls.all_reg_indexes[loc.value] gcmap[val // WORD // 8] |= r_uint(1) << (val % (WORD * 8)) for box, loc in self.fm.bindings.iteritems(): - if box.type == REF: + if box.type == REF and self.rm.stays_alive(box): assert isinstance(loc, FrameLoc) val = loc.position + JITFRAME_FIXED_SIZE gcmap[val // WORD // 8] |= r_uint(1) << (val % (WORD * 8)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit