gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870)

This commit is contained in:
Irit Katriel 2023-03-22 18:10:48 +00:00 committed by GitHub
parent 04adf2df39
commit 3468c768ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 235 additions and 437 deletions

View file

@ -247,10 +247,6 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) {
return 1;
case POP_JUMP_IF_NONE:
return 1;
case JUMP_IF_FALSE_OR_POP:
return 1;
case JUMP_IF_TRUE_OR_POP:
return 1;
case JUMP_BACKWARD_NO_INTERRUPT:
return 0;
case GET_LEN:
@ -599,10 +595,6 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
return 0;
case POP_JUMP_IF_NONE:
return 0;
case JUMP_IF_FALSE_OR_POP:
return (jump ? 1 : 0);
case JUMP_IF_TRUE_OR_POP:
return (jump ? 1 : 0);
case JUMP_BACKWARD_NO_INTERRUPT:
return 0;
case GET_LEN:
@ -836,8 +828,6 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[256] = {
[POP_JUMP_IF_TRUE] = { true, INSTR_FMT_IB },
[POP_JUMP_IF_NOT_NONE] = { true, INSTR_FMT_IB },
[POP_JUMP_IF_NONE] = { true, INSTR_FMT_IB },
[JUMP_IF_FALSE_OR_POP] = { true, INSTR_FMT_IB },
[JUMP_IF_TRUE_OR_POP] = { true, INSTR_FMT_IB },
[JUMP_BACKWARD_NO_INTERRUPT] = { true, INSTR_FMT_IB },
[GET_LEN] = { true, INSTR_FMT_IX },
[MATCH_CLASS] = { true, INSTR_FMT_IB },