Author: Armin Rigo <[email protected]>
Branch: stm-gc
Changeset: r52804:5501a1e8eba4
Date: 2012-02-23 14:59 +0100
http://bitbucket.org/pypy/pypy/changeset/5501a1e8eba4/
Log: merge heads
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
@@ -20,19 +20,17 @@
self.gsrc = GcSource(translator)
def is_local(self, variable):
- if isinstance(variable, Constant):
- if not variable.value: # the constant NULL can be considered local
- return True
- self.reason = 'constant'
- return False
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.
- self.reason = 'variable not in gsrc!'
- return False
+ if isinstance(variable, Constant):
+ srcs = [variable]
+ else:
+ # 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.
+ self.reason = 'variable not in gsrc!'
+ return False
for src in srcs:
if isinstance(src, SpaceOperation):
if src.opname in RETURNS_LOCAL_POINTER:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit