diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-10-26 15:30:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 15:30:18 (GMT) |
commit | a0c414c35d0dc0d44a885fda448652e23de2482c (patch) | |
tree | 014f5cb67924fcc0ac17d97aeb879dc05a6ccac0 /Python/compile.c | |
parent | 309efb39dc005a834bb67e9a6f27b6689f00ec9d (diff) | |
download | cpython-a0c414c35d0dc0d44a885fda448652e23de2482c.zip cpython-a0c414c35d0dc0d44a885fda448652e23de2482c.tar.gz cpython-a0c414c35d0dc0d44a885fda448652e23de2482c.tar.bz2 |
gh-111354: define names for RESUME oparg values (#111365)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c index 1d9ae62..3ff6418 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1383,7 +1383,7 @@ compiler_enter_scope(struct compiler *c, identifier name, else { RETURN_IF_ERROR(compiler_set_qualname(c)); } - ADDOP_I(c, loc, RESUME, 0); + ADDOP_I(c, loc, RESUME, RESUME_AT_FUNC_START); if (u->u_scope_type == COMPILER_SCOPE_MODULE) { loc.lineno = -1; @@ -1552,7 +1552,7 @@ compiler_add_yield_from(struct compiler *c, location loc, int await) ADDOP_JUMP(c, loc, SETUP_FINALLY, fail); ADDOP_I(c, loc, YIELD_VALUE, 0); ADDOP(c, NO_LOCATION, POP_BLOCK); - ADDOP_I(c, loc, RESUME, await ? 3 : 2); + ADDOP_I(c, loc, RESUME, await ? RESUME_AFTER_AWAIT : RESUME_AFTER_YIELD_FROM); ADDOP_JUMP(c, loc, JUMP_NO_INTERRUPT, send); USE_LABEL(c, fail); @@ -4161,7 +4161,7 @@ addop_yield(struct compiler *c, location loc) { ADDOP_I(c, loc, CALL_INTRINSIC_1, INTRINSIC_ASYNC_GEN_WRAP); } ADDOP_I(c, loc, YIELD_VALUE, 0); - ADDOP_I(c, loc, RESUME, 1); + ADDOP_I(c, loc, RESUME, RESUME_AFTER_YIELD); return SUCCESS; } |