[pypy-commit] pypy stmgc-c7: Fix the conflict with 'fixed_graphs' by moving this tiny part of the logic

arigo noreply at buildbot.pypy.org
Sat Mar 21 12:03:13 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r76490:f390775085de
Date: 2015-03-21 11:44 +0100
http://bitbucket.org/pypy/pypy/changeset/f390775085de/

Log:	Fix the conflict with 'fixed_graphs' by moving this tiny part of the
	logic outside the transactions.

diff --git a/rpython/annotator/annrpython.py b/rpython/annotator/annrpython.py
--- a/rpython/annotator/annrpython.py
+++ b/rpython/annotator/annrpython.py
@@ -40,7 +40,7 @@
         self.annotated = {}      # set of blocks already seen
         self.links_followed = {} # set of links that have ever been followed
         self.notify = {}        # {block: {positions-to-reflow-from-when-done}}
-        self.fixed_graphs = stmset()  # set of graphs not to annotate again
+        self.fixed_graphs = {}  # set of graphs not to annotate again
         self.blocked_blocks = {} # set of {blocked_block: (graph, index)}
         # --- the following information is recorded for debugging ---
         self.blocked_graphs = {} # set of graphs that have blocked blocks
diff --git a/rpython/rtyper/rtyper.py b/rpython/rtyper/rtyper.py
--- a/rpython/rtyper/rtyper.py
+++ b/rpython/rtyper/rtyper.py
@@ -244,6 +244,7 @@
               for block in pending:
                 tracking(block)
                 blockcount += 1
+                self._processing_block(block)
                 self.specialize_block(block)
                 self.already_seen[block] = True
                 # progress bar
@@ -265,6 +266,7 @@
                                (len(pending),))
                 tq = transaction.TransactionQueue()
                 for block in pending:
+                    self._processing_block(block)
                     tq.add(self.specialize_block, block)
                 tq.run()
                 self.log.event('left transactional mode')
@@ -366,7 +368,7 @@
         # and then other reprs' setup crash
         self.call_all_setups()
 
-    def _specialize_block(self, block):
+    def _processing_block(self, block):
         graph = self.annotator.annotated[block]
         if graph not in self.annotator.fixed_graphs:
             self.annotator.fixed_graphs.add(graph)
@@ -374,6 +376,7 @@
             # are concretetype'd
             self.setconcretetype(graph.getreturnvar())
 
+    def _specialize_block(self, block):
         # give the best possible types to the input args
         try:
             self.setup_block_entry(block)


More information about the pypy-commit mailing list