[pypy-commit] pypy default: Add the comments already. The test is harder :-(
arigo
noreply at buildbot.pypy.org
Tue Oct 18 12:54:01 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r48192:1ae56b2043d4
Date: 2011-10-18 12:53 +0200
http://bitbucket.org/pypy/pypy/changeset/1ae56b2043d4/
Log: Add the comments already. The test is harder :-(
diff --git a/pypy/jit/metainterp/quasiimmut.py b/pypy/jit/metainterp/quasiimmut.py
--- a/pypy/jit/metainterp/quasiimmut.py
+++ b/pypy/jit/metainterp/quasiimmut.py
@@ -76,6 +76,8 @@
def compress_looptokens_list(self):
self.looptokens_wref = [wref for wref in self.looptokens_wrefs
if wref() is not None]
+ # NB. we must keep around the looptoken_wrefs that are
+ # already invalidated; see below
self.compress_limit = (len(self.looptokens_wrefs) + 15) * 2
def invalidate(self):
@@ -89,6 +91,11 @@
if looptoken is not None:
looptoken.invalidated = True
self.cpu.invalidate_loop(looptoken)
+ # NB. we must call cpu.invalidate_loop() even if
+ # looptoken.invalidated was already set to True.
+ # It's possible to invalidate several times the
+ # same looptoken; see comments in jit.backend.model
+ # in invalidate_loop().
if not we_are_translated():
self.cpu.stats.invalidated_token_numbers.add(
looptoken.number)
More information about the pypy-commit
mailing list