[pypy-commit] pypy stmgc-c4: This may fix the order dependency.
arigo
noreply at buildbot.pypy.org
Sat Sep 7 18:15:50 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c4
Changeset: r66831:6fc66b2d62d4
Date: 2013-09-07 14:41 +0200
http://bitbucket.org/pypy/pypy/changeset/6fc66b2d62d4/
Log: This may fix the order dependency.
diff --git a/rpython/translator/stm/writebarrier.py b/rpython/translator/stm/writebarrier.py
--- a/rpython/translator/stm/writebarrier.py
+++ b/rpython/translator/stm/writebarrier.py
@@ -54,9 +54,12 @@
self.stmtransformer = stmtransformer
self.block = block
self.patch = None
- self.inputargs_category = [None] * len(block.inputargs)
+ self.inputargs_category = None
self.inputargs_category_per_link = {}
+ def init_start_block(self):
+ self.inputargs_category = [None] * len(self.block.inputargs)
+
def analyze_inside_block(self):
gcremovetypeptr = (
@@ -351,7 +354,6 @@
insert_empty_startblock(annotator, graph)
block_transformers = {}
- pending = set()
for block in graph.iterblocks():
if block.operations == ():
@@ -359,14 +361,13 @@
bt = BlockTransformer(stmtransformer, block)
bt.analyze_inside_block()
block_transformers[block] = bt
- pending.add(bt)
+
+ bt = block_transformers[graph.startblock]
+ bt.init_start_block()
+ pending = set([bt])
while pending:
- # XXX sadly, this seems to be order-dependent. Picking the minimum
- # of the blocks seems to be necessary, too, to avoid the situation
- # of two blocks chasing each other around a loop :-(
- bt = min(pending)
- pending.remove(bt)
+ bt = pending.pop()
bt.flow_through_block(graphinfo)
pending |= bt.update_targets(block_transformers)
More information about the pypy-commit
mailing list