[pypy-commit] pypy default: Don't cache bogus results in case one of the analyze_direct_call()
arigo
noreply at buildbot.pypy.org
Sat Dec 15 11:58:04 CET 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r59439:272e09815758
Date: 2012-12-15 11:57 +0100
http://bitbucket.org/pypy/pypy/changeset/272e09815758/
Log: Don't cache bogus results in case one of the analyze_direct_call()
returned a non-cached result (because of 'seen').
diff --git a/pypy/translator/backendopt/graphanalyze.py b/pypy/translator/backendopt/graphanalyze.py
--- a/pypy/translator/backendopt/graphanalyze.py
+++ b/pypy/translator/backendopt/graphanalyze.py
@@ -146,10 +146,13 @@
return self.analyzed_indirect_calls[graphs_t]
except KeyError:
results = []
+ cache = True
for graph in graphs:
results.append(self.analyze_direct_call(graph, seen))
+ cache = cache and (graph in self.analyzed_calls)
res = self.join_results(results)
- self.analyzed_indirect_calls[graphs_t] = res
+ if cache:
+ self.analyzed_indirect_calls[graphs_t] = res
return res
def analyze_oosend(self, TYPE, name, seen=None):
More information about the pypy-commit
mailing list