bpo-42635: Mark JUMP_ABSOLUTE at end of 'for' loop as artificial to avoid spurious line events. (GH-23761)

This commit is contained in:
Mark Shannon 2020-12-14 11:28:39 +00:00 committed by GitHub
parent 56aa20f9eb
commit f5e97b72fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3803 additions and 3775 deletions

View file

@ -2773,6 +2773,8 @@ compiler_for(struct compiler *c, stmt_ty s)
compiler_use_next_block(c, body);
VISIT(c, expr, s->v.For.target);
VISIT_SEQ(c, stmt, s->v.For.body);
/* Mark jump as artificial */
c->u->u_lineno = -1;
ADDOP_JUMP(c, JUMP_ABSOLUTE, start);
compiler_use_next_block(c, cleanup);

3520
Python/importlib.h generated

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff