Refactor Objects/genobject.c to get rid of these hacks/issues: - ~~`gen_close` accesses `instr_ptr - 1`~~ - `_PyGen_yf` peeks into the execution stack - Comparisons with enum values - ``result`` arg reused in ``gen_send_ex2`` for two different purposes (one of which is not the result) <!-- gh-linked-prs --> ### Linked PRs * gh-111365 * gh-111368 * gh-111459 * gh-111648 * gh-111708 <!-- /gh-linked-prs -->
Activity
pythongh-111354: define names for RESUME oparg values
gh-111354: define names for RESUME oparg values (#111365)
[-]hacks in gen_close[/-][+]remove hacks in gen_close[/+]gh-111354: simplify detection of RESUME after YIELD_VALUE at except-d…
pythongh-111354: Simplify _PyGen_yf by moving some of its work to the…
pythongh-111354: simplify detection of RESUME after YIELD_VALUE at ex…
gh-111354: Simplify _PyGen_yf by moving some of its work to the compi…
[-]remove hacks in gen_close[/-][+]remove hacks in genobject.c[/+]gh-111354: remove comparisons with enum values, variable reuse, unuse…
hugovk commentedon Nov 9, 2023
Closing as it looks like the relevant PRs have been merged, please re-open if still needed.
pythongh-111354: define names for RESUME oparg values (python#111365)
pythongh-111354: simplify detection of RESUME after YIELD_VALUE at ex…
pythongh-111354: Simplify _PyGen_yf by moving some of its work to the…
pythongh-111354: remove comparisons with enum values, variable reuse,…
pythongh-111354: define names for RESUME oparg values (python#111365)
pythongh-111354: simplify detection of RESUME after YIELD_VALUE at ex…
pythongh-111354: Simplify _PyGen_yf by moving some of its work to the…
pythongh-111354: remove comparisons with enum values, variable reuse,…