[issue27127] Never have GET_ITER not followed by FOR_ITER

Demur Rumed report at bugs.python.org
Sun Jun 5 16:58:43 EDT 2016


Demur Rumed added the comment:

I've gotten most tests to past by having FOR_ITER be traced as if the instruction index is that of the corresponding FOR_BEGIN. test_sys_settrace still fails on test_15_loops because an empty loop body doesn't have the 'pass' line traced (ie when FOR_ITER starts the line) which I'm currently pondering ways around

The first patch, which only moved GET_ITER into the closure, would still be good for list/set/dict comprehensions (to help PREDICT & JITs)

If there's essentially a decision that all loops should have JUMP_ABSOLUTE to their beginning for the sake of tracing simplicity, then FOR_BEGIN/FOR_ITER are dead

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27127>
_______________________________________


More information about the Python-bugs-list mailing list