GH-128534: Instrument branches for async for loops. (GH-130569)

This commit is contained in:
Mark Shannon 2025-02-27 09:36:41 +00:00 committed by GitHub
parent fda056e64b
commit 2a18e80695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 140 additions and 35 deletions

View file

@ -2041,6 +2041,7 @@ codegen_async_for(compiler *c, stmt_ty s)
ADDOP_LOAD_CONST(c, loc, Py_None);
ADD_YIELD_FROM(c, loc, 1);
ADDOP(c, loc, POP_BLOCK); /* for SETUP_FINALLY */
ADDOP(c, loc, NOT_TAKEN);
/* Success block for __anext__ */
VISIT(c, expr, s->v.AsyncFor.target);