[pypy-svn] r25660 - pypy/dist/pypy/translator/stackless
mwh at codespeak.net
mwh at codespeak.net
Mon Apr 10 12:55:10 CEST 2006
Author: mwh
Date: Mon Apr 10 12:55:09 2006
New Revision: 25660
Modified:
pypy/dist/pypy/translator/stackless/transform.py
Log:
(arigo, mwh)
some notes on how to make test_resume_with_exception_handling pass.
Modified: pypy/dist/pypy/translator/stackless/transform.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/transform.py (original)
+++ pypy/dist/pypy/translator/stackless/transform.py Mon Apr 10 12:55:09 2006
@@ -241,6 +241,19 @@
block.exitswitch = model.c_last_exception
var_unwind_exception = varoftype(evalue)
+ # for the case where we are resuming to an except:
+ # block we need to store here a list of links that
+ # might be resumed to, and in insert_resume_handling
+ # we need to basically copy each link onto the
+ # resuming block.
+ #
+ # it probably also makes sense to compute the list of
+ # args to save once, here, and save that too.
+ #
+ # finally, it is important that the fetch_retval
+ # function be called right at the end of the resuming
+ # block, and that it is called even if the return
+ # value is not again used.
args = [v for v in link.args
if v is not op.result and v.concretetype is not lltype.Void]
save_block, frame_state_type = self.generate_save_block(
More information about the Pypy-commit
mailing list