1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 272e098

Don't cache bogus results in case one of the analyze_direct_call()
returned a non-cached result (because of 'seen').

  • Participants
  • Parent commits 4073cee
  • Branches default

Comments (0)

Files changed (1)

File pypy/translator/backendopt/graphanalyze.py

View file
  • Ignore whitespace
             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):