Author: Armin Rigo <ar...@tunes.org> Branch: stmgc-c7 Changeset: r71788:52395a782909 Date: 2014-05-31 19:22 +0200 http://bitbucket.org/pypy/pypy/changeset/52395a782909/
Log: Fix an obscure bug. (issue 1767) diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py --- a/rpython/jit/metainterp/pyjitpl.py +++ b/rpython/jit/metainterp/pyjitpl.py @@ -196,6 +196,16 @@ [history.ConstInt(really_wanted)]) mi.vrefs_after_residual_call() mi.vable_after_residual_call() + # + if not really_wanted: + # we're about the return ConstInt(0), which will go into the + # jitcode's %iN variable. But it will be captured by the + # GUARD_NOT_FORCED's resume data too. It is essential that we + # don't capture the old, stale value! Also, store ConstInt(1) + # to make sure that upon resuming we'll see a result of 1 (XXX + # unsure if it's needed, but it shouldn't hurt). + self.make_result_of_lastop(ConstInt(1)) + # mi.generate_guard(rop.GUARD_NOT_FORCED, None) self.metainterp.heapcache.stm_break_done() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit