[pypy-svn] r23335 - pypy/dist/pypy/rpython/memory
mwh at codespeak.net
mwh at codespeak.net
Tue Feb 14 16:26:04 CET 2006
Author: mwh
Date: Tue Feb 14 16:26:01 2006
New Revision: 23335
Modified:
pypy/dist/pypy/rpython/memory/gctransform.py
Log:
don't insert the incref operations for the input args to a function too soon to
avoid having .cleanup attached to the inserted operations.
this took way too long to find.
test_del_catches in test_newgc now fails rather than crashing -- but for
somewhat fluky reasons.
Modified: pypy/dist/pypy/rpython/memory/gctransform.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctransform.py (original)
+++ pypy/dist/pypy/rpython/memory/gctransform.py Tue Feb 14 16:26:01 2006
@@ -68,12 +68,6 @@
return
self.seen_graphs[graph] = True
self.links_to_split = {} # link -> vars to pop_alive across the link
-
- newops = []
- for var in graph.startblock.inputargs:
- if var_needsgc(var):
- newops.extend(self.push_alive(var))
- graph.startblock.operations[0:0] = newops
for block in graph.iterblocks():
self.transform_block(block)
@@ -100,6 +94,11 @@
newops = []
livevars = [var for var in block.inputargs if var_needsgc(var)]
livevars2cleanup = {}
+ newops = []
+ if block.isstartblock:
+ for var in block.inputargs:
+ if var_needsgc(var):
+ newops.extend(self.push_alive(var))
for op in block.operations:
newops.extend(self.replacement_operations(op))
# XXX for now we assume that everything can raise
More information about the Pypy-commit
mailing list