[pypy-commit] pypy stmgc-c7: fix

arigo noreply at buildbot.pypy.org
Wed Jan 28 17:29:02 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r75567:4ca0f3bc9268
Date: 2015-01-28 17:25 +0100
http://bitbucket.org/pypy/pypy/changeset/4ca0f3bc9268/

Log:	fix

diff --git a/rpython/jit/metainterp/memmgr.py b/rpython/jit/metainterp/memmgr.py
--- a/rpython/jit/metainterp/memmgr.py
+++ b/rpython/jit/metainterp/memmgr.py
@@ -40,13 +40,17 @@
         # per second
         self.current_generation = r_int64(1)
         self.next_check = r_int64(-1)
-        if not stm_is_enabled():
-            self.alive_loops = {}
-        else:
-            # hash table mapping integers to looptokens
-            self.stm_alive_loops = rstm.NULL_HASHTABLE
-            # lowest integer key used in stm_alive_loops
-            self.stm_lowest_key = 0
+
+        # We can't use stm_is_enabled() here, because we have only one
+        # instance of MemoryManager built before translation.
+        # For the non-stm case, we'll use this:
+        self.alive_loops = {}
+
+        # For the stm case, we'll use this:
+        # * hash table mapping integers to looptokens
+        self.stm_alive_loops = rstm.NULL_HASHTABLE
+        # * lowest integer key used in stm_alive_loops
+        self.stm_lowest_key = 0
 
     def set_max_age(self, max_age, check_frequency=0):
         if max_age <= 0:


More information about the pypy-commit mailing list