[pypy-commit] pypy stm-gc: Fix.

arigo noreply at buildbot.pypy.org
Thu Feb 16 21:52:59 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52571:d485695d0d54
Date: 2012-02-16 21:52 +0100
http://bitbucket.org/pypy/pypy/changeset/d485695d0d54/

Log:	Fix.

diff --git a/pypy/translator/stm/localtracker.py b/pypy/translator/stm/localtracker.py
--- a/pypy/translator/stm/localtracker.py
+++ b/pypy/translator/stm/localtracker.py
@@ -21,7 +21,14 @@
 
     def is_local(self, variable):
         assert isinstance(variable, Variable)
-        for src in self.gsrc[variable]:
+        try:
+            srcs = self.gsrc[variable]
+        except KeyError:
+            # XXX we shouldn't get here, but we do translating the whole
+            # pypy.  We should investigate at some point.  In the meantime
+            # returning False is always safe.
+            return False
+        for src in srcs:
             if isinstance(src, SpaceOperation):
                 if src.opname in RETURNS_LOCAL_POINTER:
                     continue


More information about the pypy-commit mailing list