[pypy-svn] r27183 - pypy/dist/pypy/translator/stackless
pedronis at codespeak.net
pedronis at codespeak.net
Sat May 13 18:40:36 CEST 2006
Author: pedronis
Date: Sat May 13 18:40:35 2006
New Revision: 27183
Modified:
pypy/dist/pypy/translator/stackless/transform.py
Log:
stackless operations are known to need unwind logic around them.
this should fix test_tasklets.
Modified: pypy/dist/pypy/translator/stackless/transform.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/transform.py (original)
+++ pypy/dist/pypy/translator/stackless/transform.py Sat May 13 18:40:35 2006
@@ -390,10 +390,12 @@
return newop
while i < len(block.operations):
+ stackless_op = False
op = block.operations[i]
if op.opname == 'yield_current_frame_to_caller':
op = replace_with_call(self.yield_current_frame_to_caller_ptr)
-
+ stackless_op = True
+
if (op.opname in ('direct_call', 'indirect_call') or
op.opname.startswith('malloc')):
# trap calls to stackless-related suggested primitives
@@ -401,8 +403,9 @@
func = getattr(op.args[0].value._obj, '_callable', None)
if func in self.suggested_primitives:
op = replace_with_call(self.suggested_primitives[func])
-
- if not self.analyzer.analyze(op):
+ stackless_op = True
+
+ if not stackless_op and not self.analyzer.analyze(op):
i += 1
continue
More information about the Pypy-commit
mailing list