Closed
Description
Refactor Objects/genobject.c to get rid of these hacks/issues:
gen_close
accessesinstr_ptr - 1
_PyGen_yf
peeks into the execution stack- Comparisons with enum values
result
arg reused ingen_send_ex2
for two different purposes (one of which is not the result)
Linked PRs
- gh-111354: define names for RESUME oparg values #111365
- gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 #111368
- gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 #111459
- gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and frame state #111648
- gh-111354: remove comparisons with enum values, variable reuse, unused imports in genobject.c #111708