gh-98831: rewrite BEFORE_ASYNC_WITH and END_ASYNC_FOR in the instruction definition DSL (#101458)

This commit is contained in:
Irit Katriel 2023-01-31 18:47:50 +00:00 committed by GitHub
parent f80db6cef0
commit 0062f538d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 38 deletions

View file

@ -109,7 +109,7 @@ _PyOpcode_num_popped(int opcode, int oparg) {
case PREP_RERAISE_STAR:
return 2;
case END_ASYNC_FOR:
return -1;
return 2;
case CLEANUP_THROW:
return -1;
case LOAD_ASSERTION_ERROR:
@ -271,7 +271,7 @@ _PyOpcode_num_popped(int opcode, int oparg) {
case FOR_ITER_GEN:
return -1;
case BEFORE_ASYNC_WITH:
return -1;
return 1;
case BEFORE_WITH:
return 1;
case WITH_EXCEPT_START:
@ -455,7 +455,7 @@ _PyOpcode_num_pushed(int opcode, int oparg) {
case PREP_RERAISE_STAR:
return 1;
case END_ASYNC_FOR:
return -1;
return 0;
case CLEANUP_THROW:
return -1;
case LOAD_ASSERTION_ERROR:
@ -617,7 +617,7 @@ _PyOpcode_num_pushed(int opcode, int oparg) {
case FOR_ITER_GEN:
return -1;
case BEFORE_ASYNC_WITH:
return -1;
return 2;
case BEFORE_WITH:
return 2;
case WITH_EXCEPT_START: