[pypy-svn] pypy default: Mostly for symmetry reasons, also call keep_loop_alive() in

arigo commits-noreply at bitbucket.org
Sun Dec 19 12:37:57 CET 2010


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r40125:5be1f80cec63
Date: 2010-12-19 12:37 +0100
http://bitbucket.org/pypy/pypy/changeset/5be1f80cec63/

Log:	Mostly for symmetry reasons, also call keep_loop_alive() in
	send_bridge_to_backend().  One issue this fixes could be if we
	attach the bridge to a loop that is old enough to go away very soon,
	but the bridge itself is jumping somewhere else, so that the code
	in warmstate.py wouldn't immediately keep that loop alive.

diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -167,6 +167,9 @@
     if not we_are_translated():
         metainterp_sd.stats.compiled()
     metainterp_sd.log("compiled new bridge")
+    if metainterp_sd.warmrunnerdesc is not None:    # for tests
+        metainterp_sd.warmrunnerdesc.memory_manager.keep_loop_alive(
+            original_loop_token)
 
 # ____________________________________________________________
 


More information about the Pypy-commit mailing list