Message307555
I started on Antoine's PR and work on different approach (https://github.com/serhiy-storchaka/cpython/pull/1) which don't duplicate the code for continue/break/return. Instead it uses some kind of subroutines. END_FINALLY expects the one of three cases:
1. NULL (or None). Normal execution thread in try/finally. Continue from the instruction following END_FINALLY.
2. An integer. This is an address of returning. Continue from the specified address.
3. An exception (6 items). Raises the specified exception.
WITH_CLEANUP_FINISH behaves similarly.
The statements continue/break/return insert the instruction CALL_FINALLY which pushes the address of the following instruction on the stack and jumps to the start of the finally (or with cleanup) block. There can be several CALL_FINALLY instructions if you need to execute several finally blocks. At the jump instruction is inserted for continue and break, and RETURN_VALUE for return.
Currently I'm trying to simplify the code. |
|
Date |
User |
Action |
Args |
2017-12-04 12:25:35 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, nascheme, rhettinger, mark.dickinson, ncoghlan, pitrou, christian.heimes, benjamin.peterson, trent, Mark.Shannon, Demur Rumed |
2017-12-04 12:25:34 | serhiy.storchaka | set | messageid: <1512390334.97.0.213398074469.issue17611@psf.upfronthosting.co.za> |
2017-12-04 12:25:34 | serhiy.storchaka | link | issue17611 messages |
2017-12-04 12:25:34 | serhiy.storchaka | create | |
|