[pypy-svn] r23117 - pypy/branch/genc-gc-refactoring
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Feb 7 18:46:30 CET 2006
Author: cfbolz
Date: Tue Feb 7 18:46:29 2006
New Revision: 23117
Modified:
pypy/branch/genc-gc-refactoring/funcgen.py
pypy/branch/genc-gc-refactoring/gc.py
Log:
(cfbolz, mwh)
lots of broken stuff -- we need to change machines
Modified: pypy/branch/genc-gc-refactoring/funcgen.py
==============================================================================
--- pypy/branch/genc-gc-refactoring/funcgen.py (original)
+++ pypy/branch/genc-gc-refactoring/funcgen.py Tue Feb 7 18:46:29 2006
@@ -52,6 +52,12 @@
for op in block.operations:
mix.extend(op.args)
mix.append(op.result)
+ if hasattr(op, "cleanup"):
+ if op.cleanup is None:
+ continue
+ for cleanupop in op.cleanup:
+ mix.extend(cleanupop.args)
+ mix.append(cleanupop.result)
for link in block.exits:
mix.extend(link.getextravars())
mix.extend(link.args)
@@ -398,7 +404,8 @@
# skip assignment of 'void' return value
r = self.expr(op.result)
line = '%s = %s' % (r, line)
- line = '%s\n%s' % (line, self.check_directcall_result(op, err))
+ if getattr(op, 'cleanup', None) is not None:
+ line = '%s\n%s' % (line, self.check_directcall_result(op, err))
return line
# the following works since the extra arguments that indirect_call has
@@ -559,6 +566,9 @@
result.append('Py_XINCREF(%s);'%(LOCAL_VAR % op.result.name))
return '\t'.join(result)
+ OP_CAST_PTR_TO_ADR = OP_CAST_POINTER
+ OP_CAST_ADR_TO_PTR = OP_CAST_POINTER
+
def OP_CAST_INT_TO_PTR(self, op, err):
TYPE = self.lltypemap(op.result)
typename = self.db.gettype(TYPE)
Modified: pypy/branch/genc-gc-refactoring/gc.py
==============================================================================
--- pypy/branch/genc-gc-refactoring/gc.py (original)
+++ pypy/branch/genc-gc-refactoring/gc.py Tue Feb 7 18:46:29 2006
@@ -88,7 +88,7 @@
destructor = None
class RefcountingGcPolicy(BasicGcPolicy):
- transformerclass = gctransform.GCTransformer
+ transformerclass = gctransform.RefcountingGCTransformer
def push_alive_nopyobj(self, expr, T):
defnode = self.db.gettypedefnode(T.TO)
More information about the Pypy-commit
mailing list